From 2a02466430037f280645b2d4f2200ec1f902b078 Mon Sep 17 00:00:00 2001 From: Jordan Doyle Date: Sun, 2 Oct 2016 22:40:34 +0100 Subject: [PATCH] Cleanup - getting everything working when packaged seperately --- .gitignore | 1 + README.md | 6 ++++++ composer.json | 4 +++- composer.lock | 1125 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/Providers/RoutingServiceProvider.php | 28 +++++++++++++++------------- src/Providers/WordpressServiceProvider.php | 38 +++++++++++++++++++++----------------- 6 files changed, 1171 insertions(+), 31 deletions(-) create mode 100644 README.md create mode 100644 composer.lock diff --git a/.gitignore b/.gitignore index 57872d0..cac762f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /vendor/ +/.idea/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..2e02742 --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +# Larapress + +Seamlessly integrate Wordpress with Laravel. + +>If you're looking to install Larapress, this is probably not the repository you are looking for. You should go to [w4/larapress](https://github.com/w4/larapress) instead. + diff --git a/composer.json b/composer.json index 4c498df..30cb202 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,9 @@ } ], "require": { - "illuminate/support": "5.3.*" + "illuminate/support": "5.3.*", + "illuminate/database": "^5.3", + "illuminate/routing": "^5.3" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..b172d58 --- /dev/null +++ b/composer.lock @@ -0,0 +1,1125 @@ +{ + "_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#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "hash": "6c58ad1439bbf1caa3093d16a54c1ed4", + "content-hash": "422f593da2fdd296c003567b90182d68", + "packages": [ + { + "name": "doctrine/inflector", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/inflector.git", + "reference": "90b2128806bfde671b6952ab8bea493942c1fdae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/90b2128806bfde671b6952ab8bea493942c1fdae", + "reference": "90b2128806bfde671b6952ab8bea493942c1fdae", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "4.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Common\\Inflector\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Common String Manipulations with regard to casing and singular/plural rules.", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "inflection", + "pluralize", + "singularize", + "string" + ], + "time": "2015-11-06 14:35:42" + }, + { + "name": "illuminate/container", + "version": "v5.3.4", + "source": { + "type": "git", + "url": "https://github.com/illuminate/container.git", + "reference": "360f4900dbaa7e76ecfbb58e0ad4b244a90edfe3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/container/zipball/360f4900dbaa7e76ecfbb58e0ad4b244a90edfe3", + "reference": "360f4900dbaa7e76ecfbb58e0ad4b244a90edfe3", + "shasum": "" + }, + "require": { + "illuminate/contracts": "5.3.*", + "php": ">=5.6.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.3-dev" + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Container\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Container package.", + "homepage": "https://laravel.com", + "time": "2016-08-05 14:48:10" + }, + { + "name": "illuminate/contracts", + "version": "v5.3.4", + "source": { + "type": "git", + "url": "https://github.com/illuminate/contracts.git", + "reference": "f766fc0452d82d545b866a8ad5860b20ccd50763" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/contracts/zipball/f766fc0452d82d545b866a8ad5860b20ccd50763", + "reference": "f766fc0452d82d545b866a8ad5860b20ccd50763", + "shasum": "" + }, + "require": { + "php": ">=5.6.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.3-dev" + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Contracts\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Contracts package.", + "homepage": "https://laravel.com", + "time": "2016-08-21 12:37:00" + }, + { + "name": "illuminate/database", + "version": "v5.3.4", + "source": { + "type": "git", + "url": "https://github.com/illuminate/database.git", + "reference": "048a65ba4a7ed250e16c82b6bb323daf38410050" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/database/zipball/048a65ba4a7ed250e16c82b6bb323daf38410050", + "reference": "048a65ba4a7ed250e16c82b6bb323daf38410050", + "shasum": "" + }, + "require": { + "illuminate/container": "5.3.*", + "illuminate/contracts": "5.3.*", + "illuminate/support": "5.3.*", + "nesbot/carbon": "~1.20", + "php": ">=5.6.4" + }, + "suggest": { + "doctrine/dbal": "Required to rename columns and drop SQLite columns (~2.4).", + "fzaninotto/faker": "Required to use the eloquent factory builder (~1.4).", + "illuminate/console": "Required to use the database commands (5.3.*).", + "illuminate/events": "Required to use the observers with Eloquent (5.3.*).", + "illuminate/filesystem": "Required to use the migrations (5.3.*).", + "illuminate/pagination": "Required to paginate the result set (5.3.*)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.3-dev" + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Database\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Database package.", + "homepage": "https://laravel.com", + "keywords": [ + "database", + "laravel", + "orm", + "sql" + ], + "time": "2016-08-25 15:46:46" + }, + { + "name": "illuminate/http", + "version": "v5.3.4", + "source": { + "type": "git", + "url": "https://github.com/illuminate/http.git", + "reference": "333263fe8aa6db11187a256ea55c2e9e97f28c4b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/http/zipball/333263fe8aa6db11187a256ea55c2e9e97f28c4b", + "reference": "333263fe8aa6db11187a256ea55c2e9e97f28c4b", + "shasum": "" + }, + "require": { + "illuminate/session": "5.3.*", + "illuminate/support": "5.3.*", + "php": ">=5.6.4", + "symfony/http-foundation": "3.1.*", + "symfony/http-kernel": "3.1.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.3-dev" + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Http\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Http package.", + "homepage": "https://laravel.com", + "time": "2016-08-22 10:25:11" + }, + { + "name": "illuminate/pipeline", + "version": "v5.3.4", + "source": { + "type": "git", + "url": "https://github.com/illuminate/pipeline.git", + "reference": "cd469572fad11243e7f4c5c02fca410657f0a457" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/pipeline/zipball/cd469572fad11243e7f4c5c02fca410657f0a457", + "reference": "cd469572fad11243e7f4c5c02fca410657f0a457", + "shasum": "" + }, + "require": { + "illuminate/contracts": "5.3.*", + "illuminate/support": "5.3.*", + "php": ">=5.6.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.3-dev" + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Pipeline\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Pipeline package.", + "homepage": "https://laravel.com", + "time": "2016-08-07 17:26:10" + }, + { + "name": "illuminate/routing", + "version": "v5.3.4", + "source": { + "type": "git", + "url": "https://github.com/illuminate/routing.git", + "reference": "3dafc280a93178c8290828218b450ec4906235b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/routing/zipball/3dafc280a93178c8290828218b450ec4906235b4", + "reference": "3dafc280a93178c8290828218b450ec4906235b4", + "shasum": "" + }, + "require": { + "illuminate/container": "5.3.*", + "illuminate/contracts": "5.3.*", + "illuminate/http": "5.3.*", + "illuminate/pipeline": "5.3.*", + "illuminate/session": "5.3.*", + "illuminate/support": "5.3.*", + "php": ">=5.6.4", + "symfony/debug": "3.1.*", + "symfony/http-foundation": "3.1.*", + "symfony/http-kernel": "3.1.*", + "symfony/routing": "3.1.*" + }, + "suggest": { + "illuminate/console": "Required to use the make commands (5.3.*).", + "symfony/psr-http-message-bridge": "Required to psr7 bridging features (0.2.*)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.3-dev" + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Routing\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Routing package.", + "homepage": "https://laravel.com", + "time": "2016-08-26 21:12:19" + }, + { + "name": "illuminate/session", + "version": "v5.3.4", + "source": { + "type": "git", + "url": "https://github.com/illuminate/session.git", + "reference": "0f818548aa248f64d89f8129229a4de84184f59e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/session/zipball/0f818548aa248f64d89f8129229a4de84184f59e", + "reference": "0f818548aa248f64d89f8129229a4de84184f59e", + "shasum": "" + }, + "require": { + "illuminate/contracts": "5.3.*", + "illuminate/support": "5.3.*", + "nesbot/carbon": "~1.20", + "php": ">=5.6.4", + "symfony/finder": "3.1.*", + "symfony/http-foundation": "3.1.*" + }, + "suggest": { + "illuminate/console": "Required to use the session:table command (5.3.*)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.3-dev" + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Session\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Session package.", + "homepage": "https://laravel.com", + "time": "2016-08-11 22:24:39" + }, + { + "name": "illuminate/support", + "version": "v5.3.4", + "source": { + "type": "git", + "url": "https://github.com/illuminate/support.git", + "reference": "1b4f32dfa799dd8d0e0d11e0aaaf677e2829d6e8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/support/zipball/1b4f32dfa799dd8d0e0d11e0aaaf677e2829d6e8", + "reference": "1b4f32dfa799dd8d0e0d11e0aaaf677e2829d6e8", + "shasum": "" + }, + "require": { + "doctrine/inflector": "~1.0", + "ext-mbstring": "*", + "illuminate/contracts": "5.3.*", + "paragonie/random_compat": "~1.4|~2.0", + "php": ">=5.6.4" + }, + "replace": { + "tightenco/collect": "self.version" + }, + "suggest": { + "illuminate/filesystem": "Required to use the composer class (5.2.*).", + "symfony/process": "Required to use the composer class (3.1.*).", + "symfony/var-dumper": "Required to use the dd function (3.1.*)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.3-dev" + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Support\\": "" + }, + "files": [ + "helpers.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Support package.", + "homepage": "https://laravel.com", + "time": "2016-08-26 17:26:49" + }, + { + "name": "nesbot/carbon", + "version": "1.21.0", + "source": { + "type": "git", + "url": "https://github.com/briannesbitt/Carbon.git", + "reference": "7b08ec6f75791e130012f206e3f7b0e76e18e3d7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/7b08ec6f75791e130012f206e3f7b0e76e18e3d7", + "reference": "7b08ec6f75791e130012f206e3f7b0e76e18e3d7", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "symfony/translation": "~2.6|~3.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0|~5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Carbon\\": "src/Carbon/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brian Nesbitt", + "email": "brian@nesbot.com", + "homepage": "http://nesbot.com" + } + ], + "description": "A simple API extension for DateTime.", + "homepage": "http://carbon.nesbot.com", + "keywords": [ + "date", + "datetime", + "time" + ], + "time": "2015-11-04 20:07:17" + }, + { + "name": "paragonie/random_compat", + "version": "v2.0.2", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "088c04e2f261c33bed6ca5245491cfca69195ccf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/088c04e2f261c33bed6ca5245491cfca69195ccf", + "reference": "088c04e2f261c33bed6ca5245491cfca69195ccf", + "shasum": "" + }, + "require": { + "php": ">=5.2.0" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "autoload": { + "files": [ + "lib/random.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "pseudorandom", + "random" + ], + "time": "2016-04-03 06:00:07" + }, + { + "name": "psr/log", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "5277094ed527a1c4477177d102fe4c53551953e0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/5277094ed527a1c4477177d102fe4c53551953e0", + "reference": "5277094ed527a1c4477177d102fe4c53551953e0", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2016-09-19 16:02:08" + }, + { + "name": "symfony/debug", + "version": "v3.1.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/debug.git", + "reference": "34f6ac18c2974ca5fce68adf419ee7d15def6f11" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/debug/zipball/34f6ac18c2974ca5fce68adf419ee7d15def6f11", + "reference": "34f6ac18c2974ca5fce68adf419ee7d15def6f11", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "psr/log": "~1.0" + }, + "conflict": { + "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + }, + "require-dev": { + "symfony/class-loader": "~2.8|~3.0", + "symfony/http-kernel": "~2.8|~3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Debug\\": "" + }, + "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": "Symfony Debug Component", + "homepage": "https://symfony.com", + "time": "2016-08-23 13:39:15" + }, + { + "name": "symfony/event-dispatcher", + "version": "v3.1.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "c0c00c80b3a69132c4e55c3e7db32b4a387615e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/c0c00c80b3a69132c4e55c3e7db32b4a387615e5", + "reference": "c0c00c80b3a69132c4e55c3e7db32b4a387615e5", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.8|~3.0", + "symfony/dependency-injection": "~2.8|~3.0", + "symfony/expression-language": "~2.8|~3.0", + "symfony/stopwatch": "~2.8|~3.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "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": "Symfony EventDispatcher Component", + "homepage": "https://symfony.com", + "time": "2016-07-19 10:45:57" + }, + { + "name": "symfony/finder", + "version": "v3.1.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "e568ef1784f447a0e54dcb6f6de30b9747b0f577" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/e568ef1784f447a0e54dcb6f6de30b9747b0f577", + "reference": "e568ef1784f447a0e54dcb6f6de30b9747b0f577", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "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": "Symfony Finder Component", + "homepage": "https://symfony.com", + "time": "2016-08-26 12:04:02" + }, + { + "name": "symfony/http-foundation", + "version": "v3.1.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-foundation.git", + "reference": "63592e00fd90632b57ee50220a1ddb29b6bf3bb4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/63592e00fd90632b57ee50220a1ddb29b6bf3bb4", + "reference": "63592e00fd90632b57ee50220a1ddb29b6bf3bb4", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.1" + }, + "require-dev": { + "symfony/expression-language": "~2.8|~3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "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": "Symfony HttpFoundation Component", + "homepage": "https://symfony.com", + "time": "2016-08-22 12:11:19" + }, + { + "name": "symfony/http-kernel", + "version": "v3.1.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-kernel.git", + "reference": "aeda215d6b01f119508c090d2a09ebb5b0bc61f3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/aeda215d6b01f119508c090d2a09ebb5b0bc61f3", + "reference": "aeda215d6b01f119508c090d2a09ebb5b0bc61f3", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "psr/log": "~1.0", + "symfony/debug": "~2.8|~3.0", + "symfony/event-dispatcher": "~2.8|~3.0", + "symfony/http-foundation": "~2.8.8|~3.0.8|~3.1.2|~3.2" + }, + "conflict": { + "symfony/config": "<2.8" + }, + "require-dev": { + "symfony/browser-kit": "~2.8|~3.0", + "symfony/class-loader": "~2.8|~3.0", + "symfony/config": "~2.8|~3.0", + "symfony/console": "~2.8|~3.0", + "symfony/css-selector": "~2.8|~3.0", + "symfony/dependency-injection": "~2.8|~3.0", + "symfony/dom-crawler": "~2.8|~3.0", + "symfony/expression-language": "~2.8|~3.0", + "symfony/finder": "~2.8|~3.0", + "symfony/process": "~2.8|~3.0", + "symfony/routing": "~2.8|~3.0", + "symfony/stopwatch": "~2.8|~3.0", + "symfony/templating": "~2.8|~3.0", + "symfony/translation": "~2.8|~3.0", + "symfony/var-dumper": "~2.8|~3.0" + }, + "suggest": { + "symfony/browser-kit": "", + "symfony/class-loader": "", + "symfony/config": "", + "symfony/console": "", + "symfony/dependency-injection": "", + "symfony/finder": "", + "symfony/var-dumper": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "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": "Symfony HttpKernel Component", + "homepage": "https://symfony.com", + "time": "2016-09-03 15:28:24" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "dff51f72b0706335131b00a7f49606168c582594" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/dff51f72b0706335131b00a7f49606168c582594", + "reference": "dff51f72b0706335131b00a7f49606168c582594", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.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": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2016-05-18 14:26:46" + }, + { + "name": "symfony/routing", + "version": "v3.1.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/routing.git", + "reference": "8edf62498a1a4c57ba317664a4b698339c10cdf6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/routing/zipball/8edf62498a1a4c57ba317664a4b698339c10cdf6", + "reference": "8edf62498a1a4c57ba317664a4b698339c10cdf6", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "conflict": { + "symfony/config": "<2.8" + }, + "require-dev": { + "doctrine/annotations": "~1.0", + "doctrine/common": "~2.2", + "psr/log": "~1.0", + "symfony/config": "~2.8|~3.0", + "symfony/expression-language": "~2.8|~3.0", + "symfony/http-foundation": "~2.8|~3.0", + "symfony/yaml": "~2.8|~3.0" + }, + "suggest": { + "doctrine/annotations": "For using the annotation loader", + "symfony/config": "For using the all-in-one router or any loader", + "symfony/dependency-injection": "For loading routes from a service", + "symfony/expression-language": "For using expression matching", + "symfony/http-foundation": "For using a Symfony Request object", + "symfony/yaml": "For using the YAML loader" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "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": "Symfony Routing Component", + "homepage": "https://symfony.com", + "keywords": [ + "router", + "routing", + "uri", + "url" + ], + "time": "2016-08-16 14:58:24" + }, + { + "name": "symfony/translation", + "version": "v3.1.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation.git", + "reference": "a35edc277513c9bc0f063ca174c36b346f974528" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation/zipball/a35edc277513c9bc0f063ca174c36b346f974528", + "reference": "a35edc277513c9bc0f063ca174c36b346f974528", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/config": "<2.8" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.8|~3.0", + "symfony/intl": "~2.8|~3.0", + "symfony/yaml": "~2.8|~3.0" + }, + "suggest": { + "psr/log": "To use logging capability in translator", + "symfony/config": "", + "symfony/yaml": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "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": "Symfony Translation Component", + "homepage": "https://symfony.com", + "time": "2016-08-05 08:37:39" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [] +} diff --git a/src/Providers/RoutingServiceProvider.php b/src/Providers/RoutingServiceProvider.php index eb0e0e5..8e8fb0d 100644 --- a/src/Providers/RoutingServiceProvider.php +++ b/src/Providers/RoutingServiceProvider.php @@ -3,12 +3,12 @@ namespace JordanDoyle\Larapress\Providers; use Illuminate\Container\Container; use Illuminate\Routing\Router; +use Illuminate\Support\Facades\Route; use Illuminate\Support\ServiceProvider; use JordanDoyle\Larapress\Routing\ArchiveRoute; use JordanDoyle\Larapress\Routing\PageRoute; use JordanDoyle\Larapress\Routing\SingularRoute; use JordanDoyle\Larapress\Routing\TemplateRoute; -use Route; /** * Provides routing methods for Wordpress-related routes. @@ -24,28 +24,30 @@ class RoutingServiceProvider extends ServiceProvider */ public function register() { + $app = $this->app; + // Router methods - Router::macro('template', function ($slug, $action) { + Router::macro('template', function ($slug, $action) use ($app) { $action = $this->formatAction($action); $route = (new TemplateRoute($action['method'], $slug, $action)) - ->setRouter(app('router')) - ->setContainer(app(Container::class)); + ->setRouter($app->make('router')) + ->setContainer($app->make(Container::class)); return Route::getRoutes()->add($route); }); - Router::macro('page', function ($slug, $action) { + Router::macro('page', function ($slug, $action) use ($app) { $action = $this->formatAction($action); $route = (new PageRoute($action['method'], $slug, $action)) - ->setRouter(app('router')) - ->setContainer(app(Container::class)); + ->setRouter($app->make('router')) + ->setContainer($app->make(Container::class)); return Route::getRoutes()->add($route); }); - Router::macro('archive', function ($postTypes = [], $action = []) { + Router::macro('archive', function ($postTypes = [], $action = []) use ($app) { if (empty($action)) { $action = $postTypes; $postTypes = []; @@ -58,13 +60,13 @@ class RoutingServiceProvider extends ServiceProvider $action = $this->formatAction($action); $route = (new ArchiveRoute($action['method'], $postTypes, $action)) - ->setRouter(app('router')) - ->setContainer(app(Container::class)); + ->setRouter($app->make('router')) + ->setContainer($app->make(Container::class)); return Route::getRoutes()->add($route); }); - Router::macro('singular', function ($types, $action) { + Router::macro('singular', function ($types, $action) use ($app) { if (!is_array($types)) { $types = [$types]; } @@ -72,8 +74,8 @@ class RoutingServiceProvider extends ServiceProvider $action = $this->formatAction($action); $route = (new SingularRoute($action['method'], $types, $action)) - ->setRouter(app('router')) - ->setContainer(app(Container::class)); + ->setRouter($app->make('router')) + ->setContainer($app->make(Container::class)); return Route::getRoutes()->add($route); }); diff --git a/src/Providers/WordpressServiceProvider.php b/src/Providers/WordpressServiceProvider.php index 8c8ca3a..821310c 100644 --- a/src/Providers/WordpressServiceProvider.php +++ b/src/Providers/WordpressServiceProvider.php @@ -2,7 +2,7 @@ namespace JordanDoyle\Larapress\Providers; -use Illuminate\Support\Facades\App; +use Illuminate\Contracts\Routing\UrlGenerator; use Illuminate\Support\Facades\DB; use Illuminate\Support\ServiceProvider; @@ -24,7 +24,11 @@ class WordpressServiceProvider extends ServiceProvider { // get the path wordpress is installed in define('WP_PATH', - json_decode(file_get_contents(base_path('composer.json')), true)['extra']['wordpress-install-dir'] . '/'); + json_decode( + file_get_contents($this->app->basePath() . DIRECTORY_SEPARATOR . 'composer.json'), + true + )['extra']['wordpress-install-dir'] . '/' + ); $this->setConfig(); $this->triggerHooks(); @@ -53,16 +57,16 @@ class WordpressServiceProvider extends ServiceProvider define('DB_COLLATE', $db['collation']); define('DB_PREFIX', $table_prefix); - define('AUTH_KEY', config('app.auth_key')); - define('SECURE_AUTH_KEY', config('app.secure_auth_key')); - define('LOGGED_IN_KEY', config('app.logged_in_key')); - define('NONCE_KEY', config('app.nonce_key')); - define('AUTH_SALT', config('app.auth_salt')); - define('SECURE_AUTH_SALT', config('app.secure_auth_salt')); - define('LOGGED_IN_SALT', config('app.logged_in_salt')); - define('NONCE_SALT', config('app.nonce_salt')); + define('AUTH_KEY', $this->app->make('config')->get('wordpress.auth_key')); + define('SECURE_AUTH_KEY', $this->app->make('config')->get('wordpress.secure_auth_key')); + define('LOGGED_IN_KEY', $this->app->make('config')->get('wordpress.logged_in_key')); + define('NONCE_KEY', $this->app->make('config')->get('wordpress.nonce_key')); + define('AUTH_SALT', $this->app->make('config')->get('wordpress.auth_salt')); + define('SECURE_AUTH_SALT', $this->app->make('config')->get('wordpress.secure_auth_salt')); + define('LOGGED_IN_SALT', $this->app->make('config')->get('wordpress.logged_in_salt')); + define('NONCE_SALT', $this->app->make('config')->get('wordpress.nonce_salt')); - define('WP_DEBUG', config('app.debug')); + define('WP_DEBUG', $this->app->make('config')->get('app.debug')); define('SAVEQUERIES', WP_DEBUG); define('WP_DEBUG_DISPLAY', WP_DEBUG); define('SCRIPT_DEBUG', WP_DEBUG); @@ -70,16 +74,16 @@ class WordpressServiceProvider extends ServiceProvider define('DISALLOW_FILE_EDIT', true); if (!defined('ABSPATH')) { - define('ABSPATH', base_path(WP_PATH)); + define('ABSPATH', $this->app->basePath() . DIRECTORY_SEPARATOR . WP_PATH); } - define('WP_SITEURL', url(str_replace('public/', '', WP_PATH))); - define('WP_HOME', url('/')); + define('WP_SITEURL', $this->app->make(UrlGenerator::class)->to(str_replace('public/', '', WP_PATH))); + define('WP_HOME', $this->app->make(UrlGenerator::class)->to('/')); - define('WP_CONTENT_DIR', base_path('public/content')); - define('WP_CONTENT_URL', url('content')); + define('WP_CONTENT_DIR', $this->app->basePath() . DIRECTORY_SEPARATOR . 'public/content'); + define('WP_CONTENT_URL', $this->app->make(UrlGenerator::class)->to('content')); - if (App::runningInConsole()) { + if ($this->app->runningInConsole()) { $_SERVER['SERVER_PROTOCOL'] = 'https'; } -- libgit2 1.7.2