Commit 0bfcbcb89a071b0037894912873a9a081b8c20a5

Authored by Eder Soares
Committed by GitHub
2 parents 29d16cda de13b74b
Exists in 2.9 and in 8 other branches 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8

Merge pull request #5173 from portabilis/community-patch-2019-03-11

Community patch 11/03/2019
app/Http/Controllers/LegacyController.php
@@ -55,6 +55,10 @@ class LegacyController extends Controller @@ -55,6 +55,10 @@ class LegacyController extends Controller
55 */ 55 */
56 private function configureErrorsAndExceptions() 56 private function configureErrorsAndExceptions()
57 { 57 {
  58 + if (config('legacy.display_errors')) {
  59 + return;
  60 + }
  61 +
58 ini_set('display_errors', 'off'); 62 ini_set('display_errors', 'off');
59 63
60 error_reporting(0); 64 error_reporting(0);
app/Http/Middleware/ConnectTenantDatabase.php
@@ -3,22 +3,30 @@ @@ -3,22 +3,30 @@
3 namespace App\Http\Middleware; 3 namespace App\Http\Middleware;
4 4
5 use Closure; 5 use Closure;
  6 +use Illuminate\Http\Request;
6 use Illuminate\Support\Facades\DB; 7 use Illuminate\Support\Facades\DB;
7 -use Illuminate\Support\Facades\Schema; 8 +use Illuminate\Support\Str;
8 9
9 class ConnectTenantDatabase 10 class ConnectTenantDatabase
10 { 11 {
11 /** 12 /**
  13 + * @var Closure
  14 + */
  15 + private static $resolver;
  16 +
  17 + /**
12 * Handle an incoming request. 18 * Handle an incoming request.
13 * 19 *
14 - * @param \Illuminate\Http\Request $request  
15 - * @param \Closure $next 20 + * @param Request $request
  21 + * @param Closure $next
  22 + *
16 * @return mixed 23 * @return mixed
17 */ 24 */
18 public function handle($request, Closure $next) 25 public function handle($request, Closure $next)
19 { 26 {
20 $connections = config('database.connections'); 27 $connections = config('database.connections');
21 - $tenant = $request->getSubdomain(); 28 +
  29 + $tenant = $this->getTenant($request);
22 30
23 if (isset($connections[$tenant])) { 31 if (isset($connections[$tenant])) {
24 DB::setDefaultConnection($tenant); 32 DB::setDefaultConnection($tenant);
@@ -26,4 +34,50 @@ class ConnectTenantDatabase @@ -26,4 +34,50 @@ class ConnectTenantDatabase
26 34
27 return $next($request); 35 return $next($request);
28 } 36 }
  37 +
  38 + /**
  39 + * Return tenant default connection name.
  40 + *
  41 + * @param Request $request
  42 + *
  43 + * @return string
  44 + */
  45 + public function getTenant(Request $request)
  46 + {
  47 + $resolver = self::$resolver;
  48 +
  49 + if (empty($resolver)) {
  50 + $resolver = $this->getDefaultTenantResolver();
  51 + }
  52 +
  53 + return $resolver($request);
  54 + }
  55 +
  56 + /**
  57 + * Return default tenant resolver.
  58 + *
  59 + * @return Closure
  60 + */
  61 + public function getDefaultTenantResolver()
  62 + {
  63 + return function (Request $request) {
  64 + return Str::replaceFirst(
  65 + '.' . config('app.default_host'), '', $request->getHost()
  66 + );
  67 + };
  68 + }
  69 +
  70 + /**
  71 + * Set default tenant resolver.
  72 + *
  73 + * @param Closure $resolver
  74 + *
  75 + * @return bool
  76 + */
  77 + public static function setTenantResolver(Closure $resolver)
  78 + {
  79 + static::$resolver = $resolver;
  80 +
  81 + return true;
  82 + }
29 } 83 }
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 "description": "Software livre de gestão escolar", 3 "description": "Software livre de gestão escolar",
4 "type": "project", 4 "type": "project",
5 "license": "GPL-2.0-or-later", 5 "license": "GPL-2.0-or-later",
6 - "version": "2.1.4", 6 + "version": "2.1.5",
7 "keywords": [ 7 "keywords": [
8 "Portabilis", 8 "Portabilis",
9 "i-Educar" 9 "i-Educar"
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", 4 "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5 "This file is @generated automatically" 5 "This file is @generated automatically"
6 ], 6 ],
7 - "content-hash": "3d6b207cd18125b287680e8866b7e0cb", 7 + "content-hash": "d159e6466c20ce25f0aa94b3e9598165",
8 "packages": [ 8 "packages": [
9 { 9 {
10 "name": "cocur/slugify", 10 "name": "cocur/slugify",
@@ -2773,25 +2773,28 @@ @@ -2773,25 +2773,28 @@
2773 }, 2773 },
2774 { 2774 {
2775 "name": "swiftmailer/swiftmailer", 2775 "name": "swiftmailer/swiftmailer",
2776 - "version": "v6.1.3", 2776 + "version": "v6.2.0",
2777 "source": { 2777 "source": {
2778 "type": "git", 2778 "type": "git",
2779 "url": "https://github.com/swiftmailer/swiftmailer.git", 2779 "url": "https://github.com/swiftmailer/swiftmailer.git",
2780 - "reference": "8ddcb66ac10c392d3beb54829eef8ac1438595f4" 2780 + "reference": "6fa3232ff9d3f8237c0fae4b7ff05e1baa4cd707"
2781 }, 2781 },
2782 "dist": { 2782 "dist": {
2783 "type": "zip", 2783 "type": "zip",
2784 - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/8ddcb66ac10c392d3beb54829eef8ac1438595f4",  
2785 - "reference": "8ddcb66ac10c392d3beb54829eef8ac1438595f4", 2784 + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/6fa3232ff9d3f8237c0fae4b7ff05e1baa4cd707",
  2785 + "reference": "6fa3232ff9d3f8237c0fae4b7ff05e1baa4cd707",
2786 "shasum": "" 2786 "shasum": ""
2787 }, 2787 },
2788 "require": { 2788 "require": {
2789 "egulias/email-validator": "~2.0", 2789 "egulias/email-validator": "~2.0",
2790 - "php": ">=7.0.0" 2790 + "php": ">=7.0.0",
  2791 + "symfony/polyfill-iconv": "^1.0",
  2792 + "symfony/polyfill-intl-idn": "^1.10",
  2793 + "symfony/polyfill-mbstring": "^1.0"
2791 }, 2794 },
2792 "require-dev": { 2795 "require-dev": {
2793 "mockery/mockery": "~0.9.1", 2796 "mockery/mockery": "~0.9.1",
2794 - "symfony/phpunit-bridge": "~3.3@dev" 2797 + "symfony/phpunit-bridge": "^3.4.19|^4.1.8"
2795 }, 2798 },
2796 "suggest": { 2799 "suggest": {
2797 "ext-intl": "Needed to support internationalized email addresses", 2800 "ext-intl": "Needed to support internationalized email addresses",
@@ -2800,7 +2803,7 @@ @@ -2800,7 +2803,7 @@
2800 "type": "library", 2803 "type": "library",
2801 "extra": { 2804 "extra": {
2802 "branch-alias": { 2805 "branch-alias": {
2803 - "dev-master": "6.1-dev" 2806 + "dev-master": "6.2-dev"
2804 } 2807 }
2805 }, 2808 },
2806 "autoload": { 2809 "autoload": {
@@ -2828,20 +2831,20 @@ @@ -2828,20 +2831,20 @@
2828 "mail", 2831 "mail",
2829 "mailer" 2832 "mailer"
2830 ], 2833 ],
2831 - "time": "2018-09-11T07:12:52+00:00" 2834 + "time": "2019-03-10T07:52:41+00:00"
2832 }, 2835 },
2833 { 2836 {
2834 "name": "symfony/console", 2837 "name": "symfony/console",
2835 - "version": "v4.2.3", 2838 + "version": "v4.2.4",
2836 "source": { 2839 "source": {
2837 "type": "git", 2840 "type": "git",
2838 "url": "https://github.com/symfony/console.git", 2841 "url": "https://github.com/symfony/console.git",
2839 - "reference": "1f0ad51dfde4da8a6070f06adc58b4e37cbb37a4" 2842 + "reference": "9dc2299a016497f9ee620be94524e6c0af0280a9"
2840 }, 2843 },
2841 "dist": { 2844 "dist": {
2842 "type": "zip", 2845 "type": "zip",
2843 - "url": "https://api.github.com/repos/symfony/console/zipball/1f0ad51dfde4da8a6070f06adc58b4e37cbb37a4",  
2844 - "reference": "1f0ad51dfde4da8a6070f06adc58b4e37cbb37a4", 2846 + "url": "https://api.github.com/repos/symfony/console/zipball/9dc2299a016497f9ee620be94524e6c0af0280a9",
  2847 + "reference": "9dc2299a016497f9ee620be94524e6c0af0280a9",
2845 "shasum": "" 2848 "shasum": ""
2846 }, 2849 },
2847 "require": { 2850 "require": {
@@ -2900,7 +2903,7 @@ @@ -2900,7 +2903,7 @@
2900 ], 2903 ],
2901 "description": "Symfony Console Component", 2904 "description": "Symfony Console Component",
2902 "homepage": "https://symfony.com", 2905 "homepage": "https://symfony.com",
2903 - "time": "2019-01-25T14:35:16+00:00" 2906 + "time": "2019-02-23T15:17:42+00:00"
2904 }, 2907 },
2905 { 2908 {
2906 "name": "symfony/contracts", 2909 "name": "symfony/contracts",
@@ -2972,7 +2975,7 @@ @@ -2972,7 +2975,7 @@
2972 }, 2975 },
2973 { 2976 {
2974 "name": "symfony/css-selector", 2977 "name": "symfony/css-selector",
2975 - "version": "v4.2.3", 2978 + "version": "v4.2.4",
2976 "source": { 2979 "source": {
2977 "type": "git", 2980 "type": "git",
2978 "url": "https://github.com/symfony/css-selector.git", 2981 "url": "https://github.com/symfony/css-selector.git",
@@ -3025,16 +3028,16 @@ @@ -3025,16 +3028,16 @@
3025 }, 3028 },
3026 { 3029 {
3027 "name": "symfony/debug", 3030 "name": "symfony/debug",
3028 - "version": "v4.2.3", 3031 + "version": "v4.2.4",
3029 "source": { 3032 "source": {
3030 "type": "git", 3033 "type": "git",
3031 "url": "https://github.com/symfony/debug.git", 3034 "url": "https://github.com/symfony/debug.git",
3032 - "reference": "cf9b2e33f757deb884ce474e06d2647c1c769b65" 3035 + "reference": "de73f48977b8eaf7ce22814d66e43a1662cc864f"
3033 }, 3036 },
3034 "dist": { 3037 "dist": {
3035 "type": "zip", 3038 "type": "zip",
3036 - "url": "https://api.github.com/repos/symfony/debug/zipball/cf9b2e33f757deb884ce474e06d2647c1c769b65",  
3037 - "reference": "cf9b2e33f757deb884ce474e06d2647c1c769b65", 3039 + "url": "https://api.github.com/repos/symfony/debug/zipball/de73f48977b8eaf7ce22814d66e43a1662cc864f",
  3040 + "reference": "de73f48977b8eaf7ce22814d66e43a1662cc864f",
3038 "shasum": "" 3041 "shasum": ""
3039 }, 3042 },
3040 "require": { 3043 "require": {
@@ -3077,20 +3080,20 @@ @@ -3077,20 +3080,20 @@
3077 ], 3080 ],
3078 "description": "Symfony Debug Component", 3081 "description": "Symfony Debug Component",
3079 "homepage": "https://symfony.com", 3082 "homepage": "https://symfony.com",
3080 - "time": "2019-01-25T14:35:16+00:00" 3083 + "time": "2019-03-03T18:11:24+00:00"
3081 }, 3084 },
3082 { 3085 {
3083 "name": "symfony/event-dispatcher", 3086 "name": "symfony/event-dispatcher",
3084 - "version": "v4.2.3", 3087 + "version": "v4.2.4",
3085 "source": { 3088 "source": {
3086 "type": "git", 3089 "type": "git",
3087 "url": "https://github.com/symfony/event-dispatcher.git", 3090 "url": "https://github.com/symfony/event-dispatcher.git",
3088 - "reference": "bd09ad265cd50b2b9d09d65ce6aba2d29bc81fe1" 3091 + "reference": "3354d2e6af986dd71f68b4e5cf4a933ab58697fb"
3089 }, 3092 },
3090 "dist": { 3093 "dist": {
3091 "type": "zip", 3094 "type": "zip",
3092 - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/bd09ad265cd50b2b9d09d65ce6aba2d29bc81fe1",  
3093 - "reference": "bd09ad265cd50b2b9d09d65ce6aba2d29bc81fe1", 3095 + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/3354d2e6af986dd71f68b4e5cf4a933ab58697fb",
  3096 + "reference": "3354d2e6af986dd71f68b4e5cf4a933ab58697fb",
3094 "shasum": "" 3097 "shasum": ""
3095 }, 3098 },
3096 "require": { 3099 "require": {
@@ -3141,20 +3144,20 @@ @@ -3141,20 +3144,20 @@
3141 ], 3144 ],
3142 "description": "Symfony EventDispatcher Component", 3145 "description": "Symfony EventDispatcher Component",
3143 "homepage": "https://symfony.com", 3146 "homepage": "https://symfony.com",
3144 - "time": "2019-01-16T20:35:37+00:00" 3147 + "time": "2019-02-23T15:17:42+00:00"
3145 }, 3148 },
3146 { 3149 {
3147 "name": "symfony/finder", 3150 "name": "symfony/finder",
3148 - "version": "v4.2.3", 3151 + "version": "v4.2.4",
3149 "source": { 3152 "source": {
3150 "type": "git", 3153 "type": "git",
3151 "url": "https://github.com/symfony/finder.git", 3154 "url": "https://github.com/symfony/finder.git",
3152 - "reference": "ef71816cbb264988bb57fe6a73f610888b9aa70c" 3155 + "reference": "267b7002c1b70ea80db0833c3afe05f0fbde580a"
3153 }, 3156 },
3154 "dist": { 3157 "dist": {
3155 "type": "zip", 3158 "type": "zip",
3156 - "url": "https://api.github.com/repos/symfony/finder/zipball/ef71816cbb264988bb57fe6a73f610888b9aa70c",  
3157 - "reference": "ef71816cbb264988bb57fe6a73f610888b9aa70c", 3159 + "url": "https://api.github.com/repos/symfony/finder/zipball/267b7002c1b70ea80db0833c3afe05f0fbde580a",
  3160 + "reference": "267b7002c1b70ea80db0833c3afe05f0fbde580a",
3158 "shasum": "" 3161 "shasum": ""
3159 }, 3162 },
3160 "require": { 3163 "require": {
@@ -3190,20 +3193,20 @@ @@ -3190,20 +3193,20 @@
3190 ], 3193 ],
3191 "description": "Symfony Finder Component", 3194 "description": "Symfony Finder Component",
3192 "homepage": "https://symfony.com", 3195 "homepage": "https://symfony.com",
3193 - "time": "2019-01-16T20:35:37+00:00" 3196 + "time": "2019-02-23T15:42:05+00:00"
3194 }, 3197 },
3195 { 3198 {
3196 "name": "symfony/http-foundation", 3199 "name": "symfony/http-foundation",
3197 - "version": "v4.2.3", 3200 + "version": "v4.2.4",
3198 "source": { 3201 "source": {
3199 "type": "git", 3202 "type": "git",
3200 "url": "https://github.com/symfony/http-foundation.git", 3203 "url": "https://github.com/symfony/http-foundation.git",
3201 - "reference": "8d2318b73e0a1bc75baa699d00ebe2ae8b595a39" 3204 + "reference": "850a667d6254ccf6c61d853407b16f21c4579c77"
3202 }, 3205 },
3203 "dist": { 3206 "dist": {
3204 "type": "zip", 3207 "type": "zip",
3205 - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/8d2318b73e0a1bc75baa699d00ebe2ae8b595a39",  
3206 - "reference": "8d2318b73e0a1bc75baa699d00ebe2ae8b595a39", 3208 + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/850a667d6254ccf6c61d853407b16f21c4579c77",
  3209 + "reference": "850a667d6254ccf6c61d853407b16f21c4579c77",
3207 "shasum": "" 3210 "shasum": ""
3208 }, 3211 },
3209 "require": { 3212 "require": {
@@ -3244,20 +3247,20 @@ @@ -3244,20 +3247,20 @@
3244 ], 3247 ],
3245 "description": "Symfony HttpFoundation Component", 3248 "description": "Symfony HttpFoundation Component",
3246 "homepage": "https://symfony.com", 3249 "homepage": "https://symfony.com",
3247 - "time": "2019-01-29T09:49:29+00:00" 3250 + "time": "2019-02-26T08:03:39+00:00"
3248 }, 3251 },
3249 { 3252 {
3250 "name": "symfony/http-kernel", 3253 "name": "symfony/http-kernel",
3251 - "version": "v4.2.3", 3254 + "version": "v4.2.4",
3252 "source": { 3255 "source": {
3253 "type": "git", 3256 "type": "git",
3254 "url": "https://github.com/symfony/http-kernel.git", 3257 "url": "https://github.com/symfony/http-kernel.git",
3255 - "reference": "d56b1706abaa771eb6acd894c6787cb88f1dc97d" 3258 + "reference": "895ceccaa8149f9343e6134e607c21da42d73b7a"
3256 }, 3259 },
3257 "dist": { 3260 "dist": {
3258 "type": "zip", 3261 "type": "zip",
3259 - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/d56b1706abaa771eb6acd894c6787cb88f1dc97d",  
3260 - "reference": "d56b1706abaa771eb6acd894c6787cb88f1dc97d", 3262 + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/895ceccaa8149f9343e6134e607c21da42d73b7a",
  3263 + "reference": "895ceccaa8149f9343e6134e607c21da42d73b7a",
3261 "shasum": "" 3264 "shasum": ""
3262 }, 3265 },
3263 "require": { 3266 "require": {
@@ -3333,7 +3336,7 @@ @@ -3333,7 +3336,7 @@
3333 ], 3336 ],
3334 "description": "Symfony HttpKernel Component", 3337 "description": "Symfony HttpKernel Component",
3335 "homepage": "https://symfony.com", 3338 "homepage": "https://symfony.com",
3336 - "time": "2019-02-03T12:47:33+00:00" 3339 + "time": "2019-03-03T19:38:09+00:00"
3337 }, 3340 },
3338 { 3341 {
3339 "name": "symfony/polyfill-ctype", 3342 "name": "symfony/polyfill-ctype",
@@ -3394,6 +3397,127 @@ @@ -3394,6 +3397,127 @@
3394 "time": "2018-08-06T14:22:27+00:00" 3397 "time": "2018-08-06T14:22:27+00:00"
3395 }, 3398 },
3396 { 3399 {
  3400 + "name": "symfony/polyfill-iconv",
  3401 + "version": "v1.10.0",
  3402 + "source": {
  3403 + "type": "git",
  3404 + "url": "https://github.com/symfony/polyfill-iconv.git",
  3405 + "reference": "97001cfc283484c9691769f51cdf25259037eba2"
  3406 + },
  3407 + "dist": {
  3408 + "type": "zip",
  3409 + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/97001cfc283484c9691769f51cdf25259037eba2",
  3410 + "reference": "97001cfc283484c9691769f51cdf25259037eba2",
  3411 + "shasum": ""
  3412 + },
  3413 + "require": {
  3414 + "php": ">=5.3.3"
  3415 + },
  3416 + "suggest": {
  3417 + "ext-iconv": "For best performance"
  3418 + },
  3419 + "type": "library",
  3420 + "extra": {
  3421 + "branch-alias": {
  3422 + "dev-master": "1.9-dev"
  3423 + }
  3424 + },
  3425 + "autoload": {
  3426 + "psr-4": {
  3427 + "Symfony\\Polyfill\\Iconv\\": ""
  3428 + },
  3429 + "files": [
  3430 + "bootstrap.php"
  3431 + ]
  3432 + },
  3433 + "notification-url": "https://packagist.org/downloads/",
  3434 + "license": [
  3435 + "MIT"
  3436 + ],
  3437 + "authors": [
  3438 + {
  3439 + "name": "Nicolas Grekas",
  3440 + "email": "p@tchwork.com"
  3441 + },
  3442 + {
  3443 + "name": "Symfony Community",
  3444 + "homepage": "https://symfony.com/contributors"
  3445 + }
  3446 + ],
  3447 + "description": "Symfony polyfill for the Iconv extension",
  3448 + "homepage": "https://symfony.com",
  3449 + "keywords": [
  3450 + "compatibility",
  3451 + "iconv",
  3452 + "polyfill",
  3453 + "portable",
  3454 + "shim"
  3455 + ],
  3456 + "time": "2018-09-21T06:26:08+00:00"
  3457 + },
  3458 + {
  3459 + "name": "symfony/polyfill-intl-idn",
  3460 + "version": "v1.10.0",
  3461 + "source": {
  3462 + "type": "git",
  3463 + "url": "https://github.com/symfony/polyfill-intl-idn.git",
  3464 + "reference": "89de1d44f2c059b266f22c9cc9124ddc4cd0987a"
  3465 + },
  3466 + "dist": {
  3467 + "type": "zip",
  3468 + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/89de1d44f2c059b266f22c9cc9124ddc4cd0987a",
  3469 + "reference": "89de1d44f2c059b266f22c9cc9124ddc4cd0987a",
  3470 + "shasum": ""
  3471 + },
  3472 + "require": {
  3473 + "php": ">=5.3.3",
  3474 + "symfony/polyfill-mbstring": "^1.3",
  3475 + "symfony/polyfill-php72": "^1.9"
  3476 + },
  3477 + "suggest": {
  3478 + "ext-intl": "For best performance"
  3479 + },
  3480 + "type": "library",
  3481 + "extra": {
  3482 + "branch-alias": {
  3483 + "dev-master": "1.9-dev"
  3484 + }
  3485 + },
  3486 + "autoload": {
  3487 + "psr-4": {
  3488 + "Symfony\\Polyfill\\Intl\\Idn\\": ""
  3489 + },
  3490 + "files": [
  3491 + "bootstrap.php"
  3492 + ]
  3493 + },
  3494 + "notification-url": "https://packagist.org/downloads/",
  3495 + "license": [
  3496 + "MIT"
  3497 + ],
  3498 + "authors": [
  3499 + {
  3500 + "name": "Symfony Community",
  3501 + "homepage": "https://symfony.com/contributors"
  3502 + },
  3503 + {
  3504 + "name": "Laurent Bassin",
  3505 + "email": "laurent@bassin.info"
  3506 + }
  3507 + ],
  3508 + "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions",
  3509 + "homepage": "https://symfony.com",
  3510 + "keywords": [
  3511 + "compatibility",
  3512 + "idn",
  3513 + "intl",
  3514 + "polyfill",
  3515 + "portable",
  3516 + "shim"
  3517 + ],
  3518 + "time": "2018-09-30T16:36:12+00:00"
  3519 + },
  3520 + {
3397 "name": "symfony/polyfill-mbstring", 3521 "name": "symfony/polyfill-mbstring",
3398 "version": "v1.10.0", 3522 "version": "v1.10.0",
3399 "source": { 3523 "source": {
@@ -3509,7 +3633,7 @@ @@ -3509,7 +3633,7 @@
3509 }, 3633 },
3510 { 3634 {
3511 "name": "symfony/process", 3635 "name": "symfony/process",
3512 - "version": "v4.2.3", 3636 + "version": "v4.2.4",
3513 "source": { 3637 "source": {
3514 "type": "git", 3638 "type": "git",
3515 "url": "https://github.com/symfony/process.git", 3639 "url": "https://github.com/symfony/process.git",
@@ -3558,16 +3682,16 @@ @@ -3558,16 +3682,16 @@
3558 }, 3682 },
3559 { 3683 {
3560 "name": "symfony/routing", 3684 "name": "symfony/routing",
3561 - "version": "v4.2.3", 3685 + "version": "v4.2.4",
3562 "source": { 3686 "source": {
3563 "type": "git", 3687 "type": "git",
3564 "url": "https://github.com/symfony/routing.git", 3688 "url": "https://github.com/symfony/routing.git",
3565 - "reference": "7f8e44fc498972466f0841c3e48dc555f23bdf53" 3689 + "reference": "ff03eae644e6b1e26d4a04b2385fe3a1a7f04e42"
3566 }, 3690 },
3567 "dist": { 3691 "dist": {
3568 "type": "zip", 3692 "type": "zip",
3569 - "url": "https://api.github.com/repos/symfony/routing/zipball/7f8e44fc498972466f0841c3e48dc555f23bdf53",  
3570 - "reference": "7f8e44fc498972466f0841c3e48dc555f23bdf53", 3693 + "url": "https://api.github.com/repos/symfony/routing/zipball/ff03eae644e6b1e26d4a04b2385fe3a1a7f04e42",
  3694 + "reference": "ff03eae644e6b1e26d4a04b2385fe3a1a7f04e42",
3571 "shasum": "" 3695 "shasum": ""
3572 }, 3696 },
3573 "require": { 3697 "require": {
@@ -3631,20 +3755,20 @@ @@ -3631,20 +3755,20 @@
3631 "uri", 3755 "uri",
3632 "url" 3756 "url"
3633 ], 3757 ],
3634 - "time": "2019-01-29T09:49:29+00:00" 3758 + "time": "2019-02-23T15:17:42+00:00"
3635 }, 3759 },
3636 { 3760 {
3637 "name": "symfony/translation", 3761 "name": "symfony/translation",
3638 - "version": "v4.2.3", 3762 + "version": "v4.2.4",
3639 "source": { 3763 "source": {
3640 "type": "git", 3764 "type": "git",
3641 "url": "https://github.com/symfony/translation.git", 3765 "url": "https://github.com/symfony/translation.git",
3642 - "reference": "23fd7aac70d99a17a8e6473a41fec8fab3331050" 3766 + "reference": "748464177a77011f8f4cdd076773862ce4915f8f"
3643 }, 3767 },
3644 "dist": { 3768 "dist": {
3645 "type": "zip", 3769 "type": "zip",
3646 - "url": "https://api.github.com/repos/symfony/translation/zipball/23fd7aac70d99a17a8e6473a41fec8fab3331050",  
3647 - "reference": "23fd7aac70d99a17a8e6473a41fec8fab3331050", 3770 + "url": "https://api.github.com/repos/symfony/translation/zipball/748464177a77011f8f4cdd076773862ce4915f8f",
  3771 + "reference": "748464177a77011f8f4cdd076773862ce4915f8f",
3648 "shasum": "" 3772 "shasum": ""
3649 }, 3773 },
3650 "require": { 3774 "require": {
@@ -3704,20 +3828,20 @@ @@ -3704,20 +3828,20 @@
3704 ], 3828 ],
3705 "description": "Symfony Translation Component", 3829 "description": "Symfony Translation Component",
3706 "homepage": "https://symfony.com", 3830 "homepage": "https://symfony.com",
3707 - "time": "2019-01-27T23:11:39+00:00" 3831 + "time": "2019-02-27T03:31:50+00:00"
3708 }, 3832 },
3709 { 3833 {
3710 "name": "symfony/var-dumper", 3834 "name": "symfony/var-dumper",
3711 - "version": "v4.2.3", 3835 + "version": "v4.2.4",
3712 "source": { 3836 "source": {
3713 "type": "git", 3837 "type": "git",
3714 "url": "https://github.com/symfony/var-dumper.git", 3838 "url": "https://github.com/symfony/var-dumper.git",
3715 - "reference": "223bda89f9be41cf7033eeaf11bc61a280489c17" 3839 + "reference": "9f87189ac10b42edf7fb8edc846f1937c6d157cf"
3716 }, 3840 },
3717 "dist": { 3841 "dist": {
3718 "type": "zip", 3842 "type": "zip",
3719 - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/223bda89f9be41cf7033eeaf11bc61a280489c17",  
3720 - "reference": "223bda89f9be41cf7033eeaf11bc61a280489c17", 3843 + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/9f87189ac10b42edf7fb8edc846f1937c6d157cf",
  3844 + "reference": "9f87189ac10b42edf7fb8edc846f1937c6d157cf",
3721 "shasum": "" 3845 "shasum": ""
3722 }, 3846 },
3723 "require": { 3847 "require": {
@@ -3780,7 +3904,7 @@ @@ -3780,7 +3904,7 @@
3780 "debug", 3904 "debug",
3781 "dump" 3905 "dump"
3782 ], 3906 ],
3783 - "time": "2019-01-30T11:44:30+00:00" 3907 + "time": "2019-02-23T15:17:42+00:00"
3784 }, 3908 },
3785 { 3909 {
3786 "name": "tijsverkoyen/css-to-inline-styles", 3910 "name": "tijsverkoyen/css-to-inline-styles",
@@ -6282,16 +6406,16 @@ @@ -6282,16 +6406,16 @@
6282 }, 6406 },
6283 { 6407 {
6284 "name": "symfony/filesystem", 6408 "name": "symfony/filesystem",
6285 - "version": "v4.2.3", 6409 + "version": "v4.2.4",
6286 "source": { 6410 "source": {
6287 "type": "git", 6411 "type": "git",
6288 "url": "https://github.com/symfony/filesystem.git", 6412 "url": "https://github.com/symfony/filesystem.git",
6289 - "reference": "7c16ebc2629827d4ec915a52ac809768d060a4ee" 6413 + "reference": "e16b9e471703b2c60b95f14d31c1239f68f11601"
6290 }, 6414 },
6291 "dist": { 6415 "dist": {
6292 "type": "zip", 6416 "type": "zip",
6293 - "url": "https://api.github.com/repos/symfony/filesystem/zipball/7c16ebc2629827d4ec915a52ac809768d060a4ee",  
6294 - "reference": "7c16ebc2629827d4ec915a52ac809768d060a4ee", 6417 + "url": "https://api.github.com/repos/symfony/filesystem/zipball/e16b9e471703b2c60b95f14d31c1239f68f11601",
  6418 + "reference": "e16b9e471703b2c60b95f14d31c1239f68f11601",
6295 "shasum": "" 6419 "shasum": ""
6296 }, 6420 },
6297 "require": { 6421 "require": {
@@ -6328,20 +6452,20 @@ @@ -6328,20 +6452,20 @@
6328 ], 6452 ],
6329 "description": "Symfony Filesystem Component", 6453 "description": "Symfony Filesystem Component",
6330 "homepage": "https://symfony.com", 6454 "homepage": "https://symfony.com",
6331 - "time": "2019-01-16T20:35:37+00:00" 6455 + "time": "2019-02-07T11:40:08+00:00"
6332 }, 6456 },
6333 { 6457 {
6334 "name": "symfony/options-resolver", 6458 "name": "symfony/options-resolver",
6335 - "version": "v4.2.3", 6459 + "version": "v4.2.4",
6336 "source": { 6460 "source": {
6337 "type": "git", 6461 "type": "git",
6338 "url": "https://github.com/symfony/options-resolver.git", 6462 "url": "https://github.com/symfony/options-resolver.git",
6339 - "reference": "831b272963a8aa5a0613a1a7f013322d8161bbbb" 6463 + "reference": "3896e5a7d06fd15fa4947694c8dcdd371ff147d1"
6340 }, 6464 },
6341 "dist": { 6465 "dist": {
6342 "type": "zip", 6466 "type": "zip",
6343 - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/831b272963a8aa5a0613a1a7f013322d8161bbbb",  
6344 - "reference": "831b272963a8aa5a0613a1a7f013322d8161bbbb", 6467 + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/3896e5a7d06fd15fa4947694c8dcdd371ff147d1",
  6468 + "reference": "3896e5a7d06fd15fa4947694c8dcdd371ff147d1",
6345 "shasum": "" 6469 "shasum": ""
6346 }, 6470 },
6347 "require": { 6471 "require": {
@@ -6382,7 +6506,7 @@ @@ -6382,7 +6506,7 @@
6382 "configuration", 6506 "configuration",
6383 "options" 6507 "options"
6384 ], 6508 ],
6385 - "time": "2019-01-16T21:31:25+00:00" 6509 + "time": "2019-02-23T15:17:42+00:00"
6386 }, 6510 },
6387 { 6511 {
6388 "name": "symfony/polyfill-php70", 6512 "name": "symfony/polyfill-php70",
@@ -6445,7 +6569,7 @@ @@ -6445,7 +6569,7 @@
6445 }, 6569 },
6446 { 6570 {
6447 "name": "symfony/stopwatch", 6571 "name": "symfony/stopwatch",
6448 - "version": "v4.2.3", 6572 + "version": "v4.2.4",
6449 "source": { 6573 "source": {
6450 "type": "git", 6574 "type": "git",
6451 "url": "https://github.com/symfony/stopwatch.git", 6575 "url": "https://github.com/symfony/stopwatch.git",
docker-compose.yml
@@ -9,9 +9,9 @@ services: @@ -9,9 +9,9 @@ services:
9 - php 9 - php
10 ports: 10 ports:
11 - 80 11 - 80
12 - working_dir: /application 12 + working_dir: /var/www/ieducar
13 volumes: 13 volumes:
14 - - ./:/application 14 + - ./:/var/www/ieducar
15 15
16 php: 16 php:
17 container_name: ieducar-php 17 container_name: ieducar-php
@@ -26,9 +26,9 @@ services: @@ -26,9 +26,9 @@ services:
26 XDEBUG_REMOTE_PORT: 9000 26 XDEBUG_REMOTE_PORT: 9000
27 XDEBUG_REMOTE_ENABLE: 0 27 XDEBUG_REMOTE_ENABLE: 0
28 XDEBUG_AUTOSTART: 0 28 XDEBUG_AUTOSTART: 0
29 - working_dir: /application 29 + working_dir: /var/www/ieducar
30 volumes: 30 volumes:
31 - - ./:/application 31 + - ./:/var/www/ieducar
32 32
33 postgres: 33 postgres:
34 container_name: ieducar-postgres 34 container_name: ieducar-postgres
docker/nginx/Dockerfile
@@ -5,3 +5,4 @@ MAINTAINER Eder Soares @@ -5,3 +5,4 @@ MAINTAINER Eder Soares
5 RUN apt-get update -y 5 RUN apt-get update -y
6 6
7 COPY default.conf /etc/nginx/conf.d/default.conf 7 COPY default.conf /etc/nginx/conf.d/default.conf
  8 +COPY upstream.conf /etc/nginx/conf.d/upstream.conf
docker/nginx/default.conf
1 server { 1 server {
2 2
  3 + listen 80;
  4 +
  5 + server_name default_server;
  6 +
  7 + root /var/www/ieducar/public;
3 index index.php index.html; 8 index index.php index.html;
4 - server_name _; 9 +
5 error_log /var/log/nginx/error.log; 10 error_log /var/log/nginx/error.log;
6 access_log /var/log/nginx/access.log; 11 access_log /var/log/nginx/access.log;
7 - root /application/public;  
8 12
9 location ~ ^/intranet/?$ { 13 location ~ ^/intranet/?$ {
10 rewrite ^.*$ /intranet/index.php redirect; 14 rewrite ^.*$ /intranet/index.php redirect;
@@ -27,19 +31,12 @@ server { @@ -27,19 +31,12 @@ server {
27 } 31 }
28 32
29 location ~ ^(/intranet.*\.php|/modules.*\.php|/module/) { 33 location ~ ^(/intranet.*\.php|/modules.*\.php|/module/) {
30 - try_files /index.php =404;  
31 - fastcgi_split_path_info ^(.+\.php)(/.+)$;  
32 - fastcgi_pass php:9000;  
33 - fastcgi_index index.php;  
34 - include fastcgi_params;  
35 - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;  
36 - fastcgi_param PATH_INFO $fastcgi_path_info; 34 + rewrite ^(.*)$ /index.php$1;
37 } 35 }
38 36
39 location ~ \.php { 37 location ~ \.php {
40 - try_files $uri =404;  
41 fastcgi_split_path_info ^(.+\.php)(/.+)$; 38 fastcgi_split_path_info ^(.+\.php)(/.+)$;
42 - fastcgi_pass php:9000; 39 + fastcgi_pass php-fpm;
43 fastcgi_index index.php; 40 fastcgi_index index.php;
44 include fastcgi_params; 41 include fastcgi_params;
45 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 42 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
docker/nginx/upstream.conf 0 → 100644
@@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
  1 +upstream php-fpm {
  2 + server php:9000;
  3 +}
docker/php/Dockerfile
@@ -44,7 +44,7 @@ RUN docker-php-ext-install zip @@ -44,7 +44,7 @@ RUN docker-php-ext-install zip
44 44
45 RUN apt-get install -y unzip 45 RUN apt-get install -y unzip
46 46
47 -RUN ln -s /application/artisan /usr/local/bin/artisan 47 +RUN ln -s /var/www/ieducar/artisan /usr/local/bin/artisan
48 48
49 RUN mkdir -p /usr/share/man/man7 49 RUN mkdir -p /usr/share/man/man7
50 RUN apt-get install -y postgresql-client 50 RUN apt-get install -y postgresql-client
ieducar/configuration/ieducar.ini.example
@@ -136,7 +136,7 @@ report.show_error_details = true @@ -136,7 +136,7 @@ report.show_error_details = true
136 report.default_factory = Portabilis_Report_ReportFactoryPHPJasper 136 report.default_factory = Portabilis_Report_ReportFactoryPHPJasper
137 137
138 ; Define o diretório dos arquivos fontes dos relatórios 138 ; Define o diretório dos arquivos fontes dos relatórios
139 -report.source_path = /application/ieducar/modules/Reports/ReportSources/ 139 +report.source_path = /var/www/ieducar/ieducar/modules/Reports/ReportSources/
140 140
141 ; Configurações usadas pelo modulo de tratamento de erros ocorridos na aplicação. 141 ; Configurações usadas pelo modulo de tratamento de erros ocorridos na aplicação.
142 modules.error.link_to_support = https://forum.ieducar.org/ 142 modules.error.link_to_support = https://forum.ieducar.org/