my php website :D https://j0.lol

Compare changes

Choose any two refs to compare.

+3 -2
composer.json
··· 1 { 2 "require": { 3 "altorouter/altorouter": "^2.0", 4 - "michelf/php-markdown": "^2.0", 5 - "nesbot/carbon": "^3.8" 6 } 7 }
··· 1 { 2 "require": { 3 "altorouter/altorouter": "^2.0", 4 + "nesbot/carbon": "^3.8", 5 + "symfony/http-foundation": "^7.2", 6 + "symfony/routing": "^7.2" 7 } 8 }
+279 -110
composer.lock
··· 4 "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", 5 "This file is @generated automatically" 6 ], 7 - "content-hash": "b31aa5345c626611d27ce253c4630358", 8 "packages": [ 9 { 10 "name": "altorouter/altorouter", 11 - "version": "2.0.2", 12 "source": { 13 "type": "git", 14 "url": "https://github.com/dannyvankooten/AltoRouter.git", 15 - "reference": "f6fede4f94ced7c22ba63a9b8af0bf2dc38e3cb2" 16 }, 17 "dist": { 18 "type": "zip", 19 - "url": "https://api.github.com/repos/dannyvankooten/AltoRouter/zipball/f6fede4f94ced7c22ba63a9b8af0bf2dc38e3cb2", 20 - "reference": "f6fede4f94ced7c22ba63a9b8af0bf2dc38e3cb2", 21 "shasum": "" 22 }, 23 "require": { 24 - "php": ">=5.6.0" 25 }, 26 "require-dev": { 27 - "codeclimate/php-test-reporter": "dev-master", 28 - "phpunit/phpunit": "5.7.*", 29 - "squizlabs/php_codesniffer": "3.4.2" 30 }, 31 "type": "library", 32 "autoload": { ··· 61 "routing" 62 ], 63 "support": { 64 - "issues": "https://github.com/dannyvankooten/AltoRouter/issues", 65 - "source": "https://github.com/dannyvankooten/AltoRouter/tree/2.0.2" 66 }, 67 - "time": "2020-03-09T08:34:59+00:00" 68 }, 69 { 70 "name": "carbonphp/carbon-doctrine-types", ··· 135 ], 136 "time": "2024-02-09T16:56:22+00:00" 137 }, 138 - { 139 - "name": "michelf/php-markdown", 140 - "version": "2.0.0", 141 - "source": { 142 - "type": "git", 143 - "url": "https://github.com/michelf/php-markdown.git", 144 - "reference": "eb176f173fbac58a045aff78e55f833264b34e71" 145 - }, 146 - "dist": { 147 - "type": "zip", 148 - "url": "https://api.github.com/repos/michelf/php-markdown/zipball/eb176f173fbac58a045aff78e55f833264b34e71", 149 - "reference": "eb176f173fbac58a045aff78e55f833264b34e71", 150 - "shasum": "" 151 - }, 152 - "require": { 153 - "php": ">=7.4" 154 - }, 155 - "require-dev": { 156 - "friendsofphp/php-cs-fixer": "^3.0", 157 - "phpstan/phpstan": ">=1.0", 158 - "phpstan/phpstan-phpunit": ">=1.0", 159 - "phpunit/phpunit": "^9.5" 160 - }, 161 - "type": "library", 162 - "autoload": { 163 - "psr-4": { 164 - "Michelf\\": "Michelf/" 165 - } 166 - }, 167 - "notification-url": "https://packagist.org/downloads/", 168 - "license": [ 169 - "BSD-3-Clause" 170 - ], 171 - "authors": [ 172 - { 173 - "name": "Michel Fortin", 174 - "email": "michel.fortin@michelf.ca", 175 - "homepage": "https://michelf.ca/", 176 - "role": "Developer" 177 - }, 178 - { 179 - "name": "John Gruber", 180 - "homepage": "https://daringfireball.net/" 181 - } 182 - ], 183 - "description": "PHP Markdown", 184 - "homepage": "https://michelf.ca/projects/php-markdown/", 185 - "keywords": [ 186 - "markdown" 187 - ], 188 - "support": { 189 - "issues": "https://github.com/michelf/php-markdown/issues", 190 - "source": "https://github.com/michelf/php-markdown/tree/2.0.0" 191 - }, 192 - "time": "2022-09-26T12:21:08+00:00" 193 - }, 194 { 195 "name": "nesbot/carbon", 196 - "version": "3.8.0", 197 "source": { 198 "type": "git", 199 - "url": "https://github.com/briannesbitt/Carbon.git", 200 - "reference": "bbd3eef89af8ba66a3aa7952b5439168fbcc529f" 201 }, 202 "dist": { 203 "type": "zip", 204 - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/bbd3eef89af8ba66a3aa7952b5439168fbcc529f", 205 - "reference": "bbd3eef89af8ba66a3aa7952b5439168fbcc529f", 206 "shasum": "" 207 }, 208 "require": { 209 - "carbonphp/carbon-doctrine-types": "*", 210 "ext-json": "*", 211 "php": "^8.1", 212 "psr/clock": "^1.0", ··· 234 ], 235 "type": "library", 236 "extra": { 237 - "branch-alias": { 238 - "dev-master": "3.x-dev", 239 - "dev-2.x": "2.x-dev" 240 - }, 241 "laravel": { 242 "providers": [ 243 "Carbon\\Laravel\\ServiceProvider" ··· 247 "includes": [ 248 "extension.neon" 249 ] 250 } 251 }, 252 "autoload": { ··· 278 ], 279 "support": { 280 "docs": "https://carbon.nesbot.com/docs", 281 - "issues": "https://github.com/briannesbitt/Carbon/issues", 282 - "source": "https://github.com/briannesbitt/Carbon" 283 }, 284 "funding": [ 285 { ··· 295 "type": "tidelift" 296 } 297 ], 298 - "time": "2024-08-19T06:22:39+00:00" 299 }, 300 { 301 "name": "psr/clock", ··· 347 }, 348 { 349 "name": "symfony/clock", 350 - "version": "v7.1.1", 351 "source": { 352 "type": "git", 353 "url": "https://github.com/symfony/clock.git", 354 - "reference": "3dfc8b084853586de51dd1441c6242c76a28cbe7" 355 }, 356 "dist": { 357 "type": "zip", 358 - "url": "https://api.github.com/repos/symfony/clock/zipball/3dfc8b084853586de51dd1441c6242c76a28cbe7", 359 - "reference": "3dfc8b084853586de51dd1441c6242c76a28cbe7", 360 "shasum": "" 361 }, 362 "require": { ··· 401 "time" 402 ], 403 "support": { 404 - "source": "https://github.com/symfony/clock/tree/v7.1.1" 405 }, 406 "funding": [ 407 { ··· 417 "type": "tidelift" 418 } 419 ], 420 - "time": "2024-05-31T14:57:53+00:00" 421 }, 422 { 423 "name": "symfony/polyfill-mbstring", ··· 445 "type": "library", 446 "extra": { 447 "thanks": { 448 - "name": "symfony/polyfill", 449 - "url": "https://github.com/symfony/polyfill" 450 } 451 }, 452 "autoload": { ··· 519 "type": "library", 520 "extra": { 521 "thanks": { 522 - "name": "symfony/polyfill", 523 - "url": "https://github.com/symfony/polyfill" 524 } 525 }, 526 "autoload": { ··· 575 ], 576 "time": "2024-09-09T11:45:10+00:00" 577 }, 578 { 579 "name": "symfony/translation", 580 - "version": "v7.1.5", 581 "source": { 582 "type": "git", 583 "url": "https://github.com/symfony/translation.git", 584 - "reference": "235535e3f84f3dfbdbde0208ede6ca75c3a489ea" 585 }, 586 "dist": { 587 "type": "zip", 588 - "url": "https://api.github.com/repos/symfony/translation/zipball/235535e3f84f3dfbdbde0208ede6ca75c3a489ea", 589 - "reference": "235535e3f84f3dfbdbde0208ede6ca75c3a489ea", 590 "shasum": "" 591 }, 592 "require": { 593 "php": ">=8.2", 594 "symfony/polyfill-mbstring": "~1.0", 595 "symfony/translation-contracts": "^2.5|^3.0" 596 }, ··· 651 "description": "Provides tools to internationalize your application", 652 "homepage": "https://symfony.com", 653 "support": { 654 - "source": "https://github.com/symfony/translation/tree/v7.1.5" 655 }, 656 "funding": [ 657 { ··· 667 "type": "tidelift" 668 } 669 ], 670 - "time": "2024-09-16T06:30:38+00:00" 671 }, 672 { 673 "name": "symfony/translation-contracts", 674 - "version": "v3.5.0", 675 "source": { 676 "type": "git", 677 "url": "https://github.com/symfony/translation-contracts.git", 678 - "reference": "b9d2189887bb6b2e0367a9fc7136c5239ab9b05a" 679 }, 680 "dist": { 681 "type": "zip", 682 - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/b9d2189887bb6b2e0367a9fc7136c5239ab9b05a", 683 - "reference": "b9d2189887bb6b2e0367a9fc7136c5239ab9b05a", 684 "shasum": "" 685 }, 686 "require": { ··· 688 }, 689 "type": "library", 690 "extra": { 691 "branch-alias": { 692 "dev-main": "3.5-dev" 693 - }, 694 - "thanks": { 695 - "name": "symfony/contracts", 696 - "url": "https://github.com/symfony/contracts" 697 } 698 }, 699 "autoload": { ··· 729 "standards" 730 ], 731 "support": { 732 - "source": "https://github.com/symfony/translation-contracts/tree/v3.5.0" 733 }, 734 "funding": [ 735 { ··· 745 "type": "tidelift" 746 } 747 ], 748 - "time": "2024-04-18T09:32:20+00:00" 749 } 750 ], 751 "packages-dev": [], 752 "aliases": [], 753 "minimum-stability": "stable", 754 - "stability-flags": [], 755 "prefer-stable": false, 756 "prefer-lowest": false, 757 - "platform": [], 758 - "platform-dev": [], 759 "plugin-api-version": "2.6.0" 760 }
··· 4 "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", 5 "This file is @generated automatically" 6 ], 7 + "content-hash": "3544e45e7955fe5fbbfa0487876eae71", 8 "packages": [ 9 { 10 "name": "altorouter/altorouter", 11 + "version": "2.0.3", 12 "source": { 13 "type": "git", 14 "url": "https://github.com/dannyvankooten/AltoRouter.git", 15 + "reference": "9931b976423f7334c94f7b5b348be8ab1da3415d" 16 }, 17 "dist": { 18 "type": "zip", 19 + "url": "https://api.github.com/repos/dannyvankooten/AltoRouter/zipball/9931b976423f7334c94f7b5b348be8ab1da3415d", 20 + "reference": "9931b976423f7334c94f7b5b348be8ab1da3415d", 21 "shasum": "" 22 }, 23 "require": { 24 + "php": ">=7.3" 25 }, 26 "require-dev": { 27 + "phpunit/phpunit": "9.6.*", 28 + "squizlabs/php_codesniffer": "3.6.2" 29 }, 30 "type": "library", 31 "autoload": { ··· 60 "routing" 61 ], 62 "support": { 63 + "source": "https://github.com/dannyvankooten/AltoRouter/tree/2.0.3" 64 }, 65 + "time": "2025-01-05T20:33:28+00:00" 66 }, 67 { 68 "name": "carbonphp/carbon-doctrine-types", ··· 133 ], 134 "time": "2024-02-09T16:56:22+00:00" 135 }, 136 { 137 "name": "nesbot/carbon", 138 + "version": "3.8.6", 139 "source": { 140 "type": "git", 141 + "url": "https://github.com/CarbonPHP/carbon.git", 142 + "reference": "ff2f20cf83bd4d503720632ce8a426dc747bf7fd" 143 }, 144 "dist": { 145 "type": "zip", 146 + "url": "https://api.github.com/repos/CarbonPHP/carbon/zipball/ff2f20cf83bd4d503720632ce8a426dc747bf7fd", 147 + "reference": "ff2f20cf83bd4d503720632ce8a426dc747bf7fd", 148 "shasum": "" 149 }, 150 "require": { 151 + "carbonphp/carbon-doctrine-types": "<100.0", 152 "ext-json": "*", 153 "php": "^8.1", 154 "psr/clock": "^1.0", ··· 176 ], 177 "type": "library", 178 "extra": { 179 "laravel": { 180 "providers": [ 181 "Carbon\\Laravel\\ServiceProvider" ··· 185 "includes": [ 186 "extension.neon" 187 ] 188 + }, 189 + "branch-alias": { 190 + "dev-2.x": "2.x-dev", 191 + "dev-master": "3.x-dev" 192 } 193 }, 194 "autoload": { ··· 220 ], 221 "support": { 222 "docs": "https://carbon.nesbot.com/docs", 223 + "issues": "https://github.com/CarbonPHP/carbon/issues", 224 + "source": "https://github.com/CarbonPHP/carbon" 225 }, 226 "funding": [ 227 { ··· 237 "type": "tidelift" 238 } 239 ], 240 + "time": "2025-02-20T17:33:38+00:00" 241 }, 242 { 243 "name": "psr/clock", ··· 289 }, 290 { 291 "name": "symfony/clock", 292 + "version": "v7.2.0", 293 "source": { 294 "type": "git", 295 "url": "https://github.com/symfony/clock.git", 296 + "reference": "b81435fbd6648ea425d1ee96a2d8e68f4ceacd24" 297 }, 298 "dist": { 299 "type": "zip", 300 + "url": "https://api.github.com/repos/symfony/clock/zipball/b81435fbd6648ea425d1ee96a2d8e68f4ceacd24", 301 + "reference": "b81435fbd6648ea425d1ee96a2d8e68f4ceacd24", 302 "shasum": "" 303 }, 304 "require": { ··· 343 "time" 344 ], 345 "support": { 346 + "source": "https://github.com/symfony/clock/tree/v7.2.0" 347 + }, 348 + "funding": [ 349 + { 350 + "url": "https://symfony.com/sponsor", 351 + "type": "custom" 352 + }, 353 + { 354 + "url": "https://github.com/fabpot", 355 + "type": "github" 356 + }, 357 + { 358 + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 359 + "type": "tidelift" 360 + } 361 + ], 362 + "time": "2024-09-25T14:21:43+00:00" 363 + }, 364 + { 365 + "name": "symfony/deprecation-contracts", 366 + "version": "v3.5.1", 367 + "source": { 368 + "type": "git", 369 + "url": "https://github.com/symfony/deprecation-contracts.git", 370 + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6" 371 + }, 372 + "dist": { 373 + "type": "zip", 374 + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", 375 + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", 376 + "shasum": "" 377 + }, 378 + "require": { 379 + "php": ">=8.1" 380 + }, 381 + "type": "library", 382 + "extra": { 383 + "thanks": { 384 + "url": "https://github.com/symfony/contracts", 385 + "name": "symfony/contracts" 386 + }, 387 + "branch-alias": { 388 + "dev-main": "3.5-dev" 389 + } 390 + }, 391 + "autoload": { 392 + "files": [ 393 + "function.php" 394 + ] 395 + }, 396 + "notification-url": "https://packagist.org/downloads/", 397 + "license": [ 398 + "MIT" 399 + ], 400 + "authors": [ 401 + { 402 + "name": "Nicolas Grekas", 403 + "email": "p@tchwork.com" 404 + }, 405 + { 406 + "name": "Symfony Community", 407 + "homepage": "https://symfony.com/contributors" 408 + } 409 + ], 410 + "description": "A generic function and convention to trigger deprecation notices", 411 + "homepage": "https://symfony.com", 412 + "support": { 413 + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1" 414 + }, 415 + "funding": [ 416 + { 417 + "url": "https://symfony.com/sponsor", 418 + "type": "custom" 419 + }, 420 + { 421 + "url": "https://github.com/fabpot", 422 + "type": "github" 423 + }, 424 + { 425 + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 426 + "type": "tidelift" 427 + } 428 + ], 429 + "time": "2024-09-25T14:20:29+00:00" 430 + }, 431 + { 432 + "name": "symfony/http-foundation", 433 + "version": "v7.2.3", 434 + "source": { 435 + "type": "git", 436 + "url": "https://github.com/symfony/http-foundation.git", 437 + "reference": "ee1b504b8926198be89d05e5b6fc4c3810c090f0" 438 + }, 439 + "dist": { 440 + "type": "zip", 441 + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/ee1b504b8926198be89d05e5b6fc4c3810c090f0", 442 + "reference": "ee1b504b8926198be89d05e5b6fc4c3810c090f0", 443 + "shasum": "" 444 + }, 445 + "require": { 446 + "php": ">=8.2", 447 + "symfony/deprecation-contracts": "^2.5|^3.0", 448 + "symfony/polyfill-mbstring": "~1.1", 449 + "symfony/polyfill-php83": "^1.27" 450 + }, 451 + "conflict": { 452 + "doctrine/dbal": "<3.6", 453 + "symfony/cache": "<6.4.12|>=7.0,<7.1.5" 454 + }, 455 + "require-dev": { 456 + "doctrine/dbal": "^3.6|^4", 457 + "predis/predis": "^1.1|^2.0", 458 + "symfony/cache": "^6.4.12|^7.1.5", 459 + "symfony/dependency-injection": "^6.4|^7.0", 460 + "symfony/expression-language": "^6.4|^7.0", 461 + "symfony/http-kernel": "^6.4|^7.0", 462 + "symfony/mime": "^6.4|^7.0", 463 + "symfony/rate-limiter": "^6.4|^7.0" 464 + }, 465 + "type": "library", 466 + "autoload": { 467 + "psr-4": { 468 + "Symfony\\Component\\HttpFoundation\\": "" 469 + }, 470 + "exclude-from-classmap": [ 471 + "/Tests/" 472 + ] 473 + }, 474 + "notification-url": "https://packagist.org/downloads/", 475 + "license": [ 476 + "MIT" 477 + ], 478 + "authors": [ 479 + { 480 + "name": "Fabien Potencier", 481 + "email": "fabien@symfony.com" 482 + }, 483 + { 484 + "name": "Symfony Community", 485 + "homepage": "https://symfony.com/contributors" 486 + } 487 + ], 488 + "description": "Defines an object-oriented layer for the HTTP specification", 489 + "homepage": "https://symfony.com", 490 + "support": { 491 + "source": "https://github.com/symfony/http-foundation/tree/v7.2.3" 492 }, 493 "funding": [ 494 { ··· 504 "type": "tidelift" 505 } 506 ], 507 + "time": "2025-01-17T10:56:55+00:00" 508 }, 509 { 510 "name": "symfony/polyfill-mbstring", ··· 532 "type": "library", 533 "extra": { 534 "thanks": { 535 + "url": "https://github.com/symfony/polyfill", 536 + "name": "symfony/polyfill" 537 } 538 }, 539 "autoload": { ··· 606 "type": "library", 607 "extra": { 608 "thanks": { 609 + "url": "https://github.com/symfony/polyfill", 610 + "name": "symfony/polyfill" 611 } 612 }, 613 "autoload": { ··· 662 ], 663 "time": "2024-09-09T11:45:10+00:00" 664 }, 665 + { 666 + "name": "symfony/routing", 667 + "version": "v7.2.3", 668 + "source": { 669 + "type": "git", 670 + "url": "https://github.com/symfony/routing.git", 671 + "reference": "ee9a67edc6baa33e5fae662f94f91fd262930996" 672 + }, 673 + "dist": { 674 + "type": "zip", 675 + "url": "https://api.github.com/repos/symfony/routing/zipball/ee9a67edc6baa33e5fae662f94f91fd262930996", 676 + "reference": "ee9a67edc6baa33e5fae662f94f91fd262930996", 677 + "shasum": "" 678 + }, 679 + "require": { 680 + "php": ">=8.2", 681 + "symfony/deprecation-contracts": "^2.5|^3" 682 + }, 683 + "conflict": { 684 + "symfony/config": "<6.4", 685 + "symfony/dependency-injection": "<6.4", 686 + "symfony/yaml": "<6.4" 687 + }, 688 + "require-dev": { 689 + "psr/log": "^1|^2|^3", 690 + "symfony/config": "^6.4|^7.0", 691 + "symfony/dependency-injection": "^6.4|^7.0", 692 + "symfony/expression-language": "^6.4|^7.0", 693 + "symfony/http-foundation": "^6.4|^7.0", 694 + "symfony/yaml": "^6.4|^7.0" 695 + }, 696 + "type": "library", 697 + "autoload": { 698 + "psr-4": { 699 + "Symfony\\Component\\Routing\\": "" 700 + }, 701 + "exclude-from-classmap": [ 702 + "/Tests/" 703 + ] 704 + }, 705 + "notification-url": "https://packagist.org/downloads/", 706 + "license": [ 707 + "MIT" 708 + ], 709 + "authors": [ 710 + { 711 + "name": "Fabien Potencier", 712 + "email": "fabien@symfony.com" 713 + }, 714 + { 715 + "name": "Symfony Community", 716 + "homepage": "https://symfony.com/contributors" 717 + } 718 + ], 719 + "description": "Maps an HTTP request to a set of configuration variables", 720 + "homepage": "https://symfony.com", 721 + "keywords": [ 722 + "router", 723 + "routing", 724 + "uri", 725 + "url" 726 + ], 727 + "support": { 728 + "source": "https://github.com/symfony/routing/tree/v7.2.3" 729 + }, 730 + "funding": [ 731 + { 732 + "url": "https://symfony.com/sponsor", 733 + "type": "custom" 734 + }, 735 + { 736 + "url": "https://github.com/fabpot", 737 + "type": "github" 738 + }, 739 + { 740 + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 741 + "type": "tidelift" 742 + } 743 + ], 744 + "time": "2025-01-17T10:56:55+00:00" 745 + }, 746 { 747 "name": "symfony/translation", 748 + "version": "v7.2.4", 749 "source": { 750 "type": "git", 751 "url": "https://github.com/symfony/translation.git", 752 + "reference": "283856e6981286cc0d800b53bd5703e8e363f05a" 753 }, 754 "dist": { 755 "type": "zip", 756 + "url": "https://api.github.com/repos/symfony/translation/zipball/283856e6981286cc0d800b53bd5703e8e363f05a", 757 + "reference": "283856e6981286cc0d800b53bd5703e8e363f05a", 758 "shasum": "" 759 }, 760 "require": { 761 "php": ">=8.2", 762 + "symfony/deprecation-contracts": "^2.5|^3", 763 "symfony/polyfill-mbstring": "~1.0", 764 "symfony/translation-contracts": "^2.5|^3.0" 765 }, ··· 820 "description": "Provides tools to internationalize your application", 821 "homepage": "https://symfony.com", 822 "support": { 823 + "source": "https://github.com/symfony/translation/tree/v7.2.4" 824 }, 825 "funding": [ 826 { ··· 836 "type": "tidelift" 837 } 838 ], 839 + "time": "2025-02-13T10:27:23+00:00" 840 }, 841 { 842 "name": "symfony/translation-contracts", 843 + "version": "v3.5.1", 844 "source": { 845 "type": "git", 846 "url": "https://github.com/symfony/translation-contracts.git", 847 + "reference": "4667ff3bd513750603a09c8dedbea942487fb07c" 848 }, 849 "dist": { 850 "type": "zip", 851 + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/4667ff3bd513750603a09c8dedbea942487fb07c", 852 + "reference": "4667ff3bd513750603a09c8dedbea942487fb07c", 853 "shasum": "" 854 }, 855 "require": { ··· 857 }, 858 "type": "library", 859 "extra": { 860 + "thanks": { 861 + "url": "https://github.com/symfony/contracts", 862 + "name": "symfony/contracts" 863 + }, 864 "branch-alias": { 865 "dev-main": "3.5-dev" 866 } 867 }, 868 "autoload": { ··· 898 "standards" 899 ], 900 "support": { 901 + "source": "https://github.com/symfony/translation-contracts/tree/v3.5.1" 902 }, 903 "funding": [ 904 { ··· 914 "type": "tidelift" 915 } 916 ], 917 + "time": "2024-09-25T14:20:29+00:00" 918 } 919 ], 920 "packages-dev": [], 921 "aliases": [], 922 "minimum-stability": "stable", 923 + "stability-flags": {}, 924 "prefer-stable": false, 925 "prefer-lowest": false, 926 + "platform": {}, 927 + "platform-dev": {}, 928 "plugin-api-version": "2.6.0" 929 }
+54 -22
index.php
··· 2 3 declare(strict_types=1); 4 5 require_once 'vendor/autoload.php'; 6 require_once 'posts/post-list.php'; 7 8 - global $router; 9 10 function fragment(string $name): void 11 { 12 require_once __DIR__ . '/routes/fragments/' . $name . '.php'; 13 } 14 15 - $router = new AltoRouter(); 16 17 /** 18 * This can be useful if you're using PHP's built-in web server, to serve files like images or css ··· 22 return; 23 } 24 25 - try { 26 - $router->map('GET', '/', 'routes/home.php', "index"); 27 - $router->map('GET', '/blog', 'routes/blog-index.php', "blog-index"); 28 - $router->map('GET', '/blog/[*:post_slug]', 'routes/blog-post.php', "blog-post"); 29 - $router->map('GET', '/contact', 'routes/contact.php', "contact"); 30 - $router->map('GET', '/projects', 'routes/projects.php', "projects"); 31 - $router->map('GET', '/friends', 'routes/88x31-wall.php', "friends"); 32 - $router->map('GET', '/feed[.xml]?', 'routes/feed.php', "feed"); 33 - } catch (Exception $e) { 34 - echo $e; 35 - } 36 37 // Match the current request 38 - $match = $router->match(urldecode($_SERVER['REQUEST_URI'])); 39 - if ($match) { 40 - foreach ($match['params'] as &$param) { 41 - ${key($match['params'])} = $param; 42 - } 43 - require_once $match['target']; 44 - } else { 45 - http_response_code(404); 46 - exit('Page not found'); 47 }
··· 2 3 declare(strict_types=1); 4 5 + use Symfony\Component\HttpFoundation\Request; 6 + use Symfony\Component\HttpFoundation\Response; 7 + use Symfony\Component\Routing; 8 + use Symfony\Component\Routing\Route; 9 + use Symfony\Component\Routing\RouteCollection; 10 + 11 require_once 'vendor/autoload.php'; 12 require_once 'posts/post-list.php'; 13 14 + 15 16 function fragment(string $name): void 17 { 18 require_once __DIR__ . '/routes/fragments/' . $name . '.php'; 19 } 20 21 + $routes = new RouteCollection(); 22 + 23 + //$router = new AltoRouter(); 24 25 /** 26 * This can be useful if you're using PHP's built-in web server, to serve files like images or css ··· 30 return; 31 } 32 33 + $request = Request::createFromGlobals(); 34 + 35 + $routes->add("home", new Route('/') ); 36 + $routes->add("blog-index", new Route('/blog') ); 37 + $routes->add("blog-post", new Route('/blog/{post_slug}', ['post_slug' => '404']) ); 38 + $routes->add("contact", new Route('/contact') ); 39 + $routes->add("projects", new Route('/projects') ); 40 + $routes->add("friends", new Route('/friends') ); 41 + $routes->add("feed", new Route('/feed{_format}', requirements: ['_format' => '|.xml']) ); 42 + 43 + //$router->map('GET', '/blog', 'routes/blog-index.php', "blog-index"); 44 + //$router->map('GET', '/blog/[*:post_slug]', 'routes/blog-post.php', "blog-post"); 45 + //$router->map('GET', '/contact', 'routes/contact.php', "contact"); 46 + //$router->map('GET', '/projects', 'routes/projects.php', "projects"); 47 + //$router->map('GET', '/friends', 'routes/88x31-wall.php', "friends"); 48 + //$router->map('GET', '/feed[.xml]?', 'routes/feed.php', "feed"); 49 50 // Match the current request 51 + //$match = $router->match(urldecode($_SERVER['REQUEST_URI'])); 52 + //if ($match) { 53 + // foreach ($match['params'] as &$param) { 54 + // ${key($match['params'])} = $param; 55 + // } 56 + // require_once $match['target']; 57 + //} else { 58 + // http_response_code(404); 59 + // exit('Page not found'); 60 + //} 61 + 62 + $context = new Routing\RequestContext(); 63 + $context->fromRequest($request); 64 + $matcher = new Routing\Matcher\UrlMatcher($routes, $context); 65 + 66 + 67 + try { 68 + extract($matcher->match($request->getPathInfo()), EXTR_SKIP); 69 + ob_start(); 70 + include sprintf(__DIR__.'/routes/%s.php', $_route); 71 + 72 + $response = new Response(ob_get_clean()); 73 + } catch (Routing\Exception\ResourceNotFoundException $exception) { 74 + $response = new Response('Not Found', 404); 75 + } catch (Exception $exception) { 76 + $response = new Response('An error occurred', 500); 77 } 78 + 79 + $response->send();
static/bsky-comments.js