Skip to content

Commit b84ca6e

Browse files
committed
Release 4.0.0-rc.3
1 parent 6b842e4 commit b84ca6e

File tree

225 files changed

+779
-353
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

225 files changed

+779
-353
lines changed

app/Config/App.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,12 +237,14 @@ class App extends BaseConfig
237237
| recommended CSRF protection be enabled.
238238
|
239239
| CSRFTokenName = The token name
240+
| CSRFHeaderName = The header name
240241
| CSRFCookieName = The cookie name
241242
| CSRFExpire = The number in seconds the token should expire.
242243
| CSRFRegenerate = Regenerate token on every submission
243244
| CSRFRedirect = Redirect to previous page with error on failure
244245
*/
245246
public $CSRFTokenName = 'csrf_test_name';
247+
public $CSRFHeaderName = 'X-CSRF-TOKEN';
246248
public $CSRFCookieName = 'csrf_cookie_name';
247249
public $CSRFExpire = 7200;
248250
public $CSRFRegenerate = true;

license.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
The MIT License (MIT)
22

33
Copyright (c) 2014-2019 British Columbia Institute of Technology
4+
Copyright (c) 2019 CodeIgniter Foundation
45

56
Permission is hereby granted, free of charge, to any person obtaining a copy
67
of this software and associated documentation files (the "Software"), to deal

system/API/ResponseTrait.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* This content is released under the MIT License (MIT)
99
*
1010
* Copyright (c) 2014-2019 British Columbia Institute of Technology
11+
* Copyright (c) 2019 CodeIgniter Foundation
1112
*
1213
* Permission is hereby granted, free of charge, to any person obtaining a copy
1314
* of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +30,7 @@
2930
*
3031
* @package CodeIgniter
3132
* @author CodeIgniter Dev Team
32-
* @copyright 2014-2019 British Columbia Institute of Technology (https://bcit.ca/)
33+
* @copyright 2019 CodeIgniter Foundation
3334
* @license https://opensource.org/licenses/MIT MIT License
3435
* @link https://codeigniter.com
3536
* @since Version 4.0.0

system/Autoloader/Autoloader.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* This content is released under the MIT License (MIT)
99
*
1010
* Copyright (c) 2014-2019 British Columbia Institute of Technology
11+
* Copyright (c) 2019 CodeIgniter Foundation
1112
*
1213
* Permission is hereby granted, free of charge, to any person obtaining a copy
1314
* of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +30,7 @@
2930
*
3031
* @package CodeIgniter
3132
* @author CodeIgniter Dev Team
32-
* @copyright 2014-2019 British Columbia Institute of Technology (https://bcit.ca/)
33+
* @copyright 2019 CodeIgniter Foundation
3334
* @license https://opensource.org/licenses/MIT MIT License
3435
* @link https://codeigniter.com
3536
* @since Version 4.0.0

system/Autoloader/FileLocator.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* This content is released under the MIT License (MIT)
99
*
1010
* Copyright (c) 2014-2019 British Columbia Institute of Technology
11+
* Copyright (c) 2019 CodeIgniter Foundation
1112
*
1213
* Permission is hereby granted, free of charge, to any person obtaining a copy
1314
* of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +30,7 @@
2930
*
3031
* @package CodeIgniter
3132
* @author CodeIgniter Dev Team
32-
* @copyright 2014-2019 British Columbia Institute of Technology (https://bcit.ca/)
33+
* @copyright 2019 CodeIgniter Foundation
3334
* @license https://opensource.org/licenses/MIT MIT License
3435
* @link https://codeigniter.com
3536
* @since Version 4.0.0
@@ -292,7 +293,7 @@ protected function getNamespaces()
292293
{
293294
$namespaces[] = [
294295
'prefix' => $prefix,
295-
'path' => rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR,
296+
'path' => rtrim($path, '\\/') . DIRECTORY_SEPARATOR,
296297
];
297298
}
298299
}

system/CLI/BaseCommand.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* This content is released under the MIT License (MIT)
88
*
99
* Copyright (c) 2014-2019 British Columbia Institute of Technology
10+
* Copyright (c) 2019 CodeIgniter Foundation
1011
*
1112
* Permission is hereby granted, free of charge, to any person obtaining a copy
1213
* of this software and associated documentation files (the "Software"), to deal
@@ -28,7 +29,7 @@
2829
*
2930
* @package CodeIgniter
3031
* @author CodeIgniter Dev Team
31-
* @copyright 2014-2019 British Columbia Institute of Technology (https://bcit.ca/)
32+
* @copyright 2019 CodeIgniter Foundation
3233
* @license https://opensource.org/licenses/MIT MIT License
3334
* @link https://codeigniter.com
3435
* @since Version 4.0.0
@@ -195,7 +196,7 @@ public function __get(string $key)
195196
*
196197
* @param string $key
197198
*
198-
* @return bool
199+
* @return boolean
199200
*/
200201
public function __isset(string $key): bool
201202
{

system/CLI/CLI.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* This content is released under the MIT License (MIT)
99
*
1010
* Copyright (c) 2014-2019 British Columbia Institute of Technology
11+
* Copyright (c) 2019 CodeIgniter Foundation
1112
*
1213
* Permission is hereby granted, free of charge, to any person obtaining a copy
1314
* of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +30,7 @@
2930
*
3031
* @package CodeIgniter
3132
* @author CodeIgniter Dev Team
32-
* @copyright 2014-2019 British Columbia Institute of Technology (https://bcit.ca/)
33+
* @copyright 2019 CodeIgniter Foundation
3334
* @license https://opensource.org/licenses/MIT MIT License
3435
* @link https://codeigniter.com
3536
* @since Version 4.0.0

system/CLI/CommandRunner.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* This content is released under the MIT License (MIT)
1010
*
1111
* Copyright (c) 2014-2019 British Columbia Institute of Technology
12+
* Copyright (c) 2019 CodeIgniter Foundation
1213
*
1314
* Permission is hereby granted, free of charge, to any person obtaining a copy
1415
* of this software and associated documentation files (the "Software"), to deal
@@ -30,7 +31,7 @@
3031
*
3132
* @package CodeIgniter
3233
* @author CodeIgniter Dev Team
33-
* @copyright 2014-2019 British Columbia Institute of Technology (https://bcit.ca/)
34+
* @copyright 2019 CodeIgniter Foundation
3435
* @license https://opensource.org/licenses/MIT MIT License
3536
* @link https://codeigniter.com
3637
* @since Version 4.0.0

system/CLI/Console.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* This content is released under the MIT License (MIT)
99
*
1010
* Copyright (c) 2014-2019 British Columbia Institute of Technology
11+
* Copyright (c) 2019 CodeIgniter Foundation
1112
*
1213
* Permission is hereby granted, free of charge, to any person obtaining a copy
1314
* of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +30,7 @@
2930
*
3031
* @package CodeIgniter
3132
* @author CodeIgniter Dev Team
32-
* @copyright 2014-2019 British Columbia Institute of Technology (https://bcit.ca/)
33+
* @copyright 2019 CodeIgniter Foundation
3334
* @license https://opensource.org/licenses/MIT MIT License
3435
* @link https://codeigniter.com
3536
* @since Version 4.0.0

system/Cache/CacheFactory.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* This content is released under the MIT License (MIT)
99
*
1010
* Copyright (c) 2014-2019 British Columbia Institute of Technology
11+
* Copyright (c) 2019 CodeIgniter Foundation
1112
*
1213
* Permission is hereby granted, free of charge, to any person obtaining a copy
1314
* of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +30,7 @@
2930
*
3031
* @package CodeIgniter
3132
* @author CodeIgniter Dev Team
32-
* @copyright 2014-2019 British Columbia Institute of Technology (https://bcit.ca/)
33+
* @copyright 2019 CodeIgniter Foundation
3334
* @license https://opensource.org/licenses/MIT MIT License
3435
* @link https://codeigniter.com
3536
* @since Version 4.0.0

system/Cache/CacheInterface.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* This content is released under the MIT License (MIT)
99
*
1010
* Copyright (c) 2014-2019 British Columbia Institute of Technology
11+
* Copyright (c) 2019 CodeIgniter Foundation
1112
*
1213
* Permission is hereby granted, free of charge, to any person obtaining a copy
1314
* of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +30,7 @@
2930
*
3031
* @package CodeIgniter
3132
* @author CodeIgniter Dev Team
32-
* @copyright 2014-2019 British Columbia Institute of Technology (https://bcit.ca/)
33+
* @copyright 2019 CodeIgniter Foundation
3334
* @license https://opensource.org/licenses/MIT MIT License
3435
* @link https://codeigniter.com
3536
* @since Version 4.0.0

system/Cache/Handlers/DummyHandler.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* This content is released under the MIT License (MIT)
88
*
99
* Copyright (c) 2014-2019 British Columbia Institute of Technology
10+
* Copyright (c) 2019 CodeIgniter Foundation
1011
*
1112
* Permission is hereby granted, free of charge, to any person obtaining a copy
1213
* of this software and associated documentation files (the "Software"), to deal
@@ -28,7 +29,7 @@
2829
*
2930
* @package CodeIgniter
3031
* @author CodeIgniter Dev Team
31-
* @copyright 2014-2019 British Columbia Institute of Technology (https://bcit.ca/)
32+
* @copyright 2019 CodeIgniter Foundation
3233
* @license https://opensource.org/licenses/MIT MIT License
3334
* @link https://codeigniter.com
3435
* @since Version 4.0.0

system/Cache/Handlers/FileHandler.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* This content is released under the MIT License (MIT)
99
*
1010
* Copyright (c) 2014-2019 British Columbia Institute of Technology
11+
* Copyright (c) 2019 CodeIgniter Foundation
1112
*
1213
* Permission is hereby granted, free of charge, to any person obtaining a copy
1314
* of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +30,7 @@
2930
*
3031
* @package CodeIgniter
3132
* @author CodeIgniter Dev Team
32-
* @copyright 2014-2019 British Columbia Institute of Technology (https://bcit.ca/)
33+
* @copyright 2019 CodeIgniter Foundation
3334
* @license https://opensource.org/licenses/MIT MIT License
3435
* @link https://codeigniter.com
3536
* @since Version 4.0.0

system/Cache/Handlers/MemcachedHandler.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* This content is released under the MIT License (MIT)
88
*
99
* Copyright (c) 2014-2019 British Columbia Institute of Technology
10+
* Copyright (c) 2019 CodeIgniter Foundation
1011
*
1112
* Permission is hereby granted, free of charge, to any person obtaining a copy
1213
* of this software and associated documentation files (the "Software"), to deal
@@ -28,7 +29,7 @@
2829
*
2930
* @package CodeIgniter
3031
* @author CodeIgniter Dev Team
31-
* @copyright 2014-2019 British Columbia Institute of Technology (https://bcit.ca/)
32+
* @copyright 2019 CodeIgniter Foundation
3233
* @license https://opensource.org/licenses/MIT MIT License
3334
* @link https://codeigniter.com
3435
* @since Version 4.0.0

system/Cache/Handlers/PredisHandler.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* This content is released under the MIT License (MIT)
88
*
99
* Copyright (c) 2014-2019 British Columbia Institute of Technology
10+
* Copyright (c) 2019 CodeIgniter Foundation
1011
*
1112
* Permission is hereby granted, free of charge, to any person obtaining a copy
1213
* of this software and associated documentation files (the "Software"), to deal
@@ -28,7 +29,7 @@
2829
*
2930
* @package CodeIgniter
3031
* @author CodeIgniter Dev Team
31-
* @copyright 2014-2019 British Columbia Institute of Technology (https://bcit.ca/)
32+
* @copyright 2019 CodeIgniter Foundation
3233
* @license https://opensource.org/licenses/MIT MIT License
3334
* @link https://codeigniter.com
3435
* @since Version 4.0.0

system/Cache/Handlers/RedisHandler.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* This content is released under the MIT License (MIT)
99
*
1010
* Copyright (c) 2014-2019 British Columbia Institute of Technology
11+
* Copyright (c) 2019 CodeIgniter Foundation
1112
*
1213
* Permission is hereby granted, free of charge, to any person obtaining a copy
1314
* of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +30,7 @@
2930
*
3031
* @package CodeIgniter
3132
* @author CodeIgniter Dev Team
32-
* @copyright 2014-2019 British Columbia Institute of Technology (https://bcit.ca/)
33+
* @copyright 2019 CodeIgniter Foundation
3334
* @license https://opensource.org/licenses/MIT MIT License
3435
* @link https://codeigniter.com
3536
* @since Version 4.0.0

system/Cache/Handlers/WincacheHandler.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* This content is released under the MIT License (MIT)
1010
*
1111
* Copyright (c) 2014-2019 British Columbia Institute of Technology
12+
* Copyright (c) 2019 CodeIgniter Foundation
1213
*
1314
* Permission is hereby granted, free of charge, to any person obtaining a copy
1415
* of this software and associated documentation files (the "Software"), to deal
@@ -30,7 +31,7 @@
3031
*
3132
* @package CodeIgniter
3233
* @author CodeIgniter Dev Team
33-
* @copyright 2014-2019 British Columbia Institute of Technology (https://bcit.ca/)
34+
* @copyright 2019 CodeIgniter Foundation
3435
* @license https://opensource.org/licenses/MIT MIT License
3536
* @link https://codeigniter.com
3637
* @since Version 4.0.0

system/CodeIgniter.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* This content is released under the MIT License (MIT)
88
*
99
* Copyright (c) 2014-2019 British Columbia Institute of Technology
10+
* Copyright (c) 2019 CodeIgniter Foundation
1011
*
1112
* Permission is hereby granted, free of charge, to any person obtaining a copy
1213
* of this software and associated documentation files (the "Software"), to deal
@@ -28,7 +29,7 @@
2829
*
2930
* @package CodeIgniter
3031
* @author CodeIgniter Dev Team
31-
* @copyright 2014-2019 British Columbia Institute of Technology (https://bcit.ca/)
32+
* @copyright 2019 CodeIgniter Foundation
3233
* @license https://opensource.org/licenses/MIT MIT License
3334
* @link https://codeigniter.com
3435
* @since Version 4.0.0
@@ -38,7 +39,6 @@
3839
namespace CodeIgniter;
3940

4041
use Closure;
41-
use CodeIgniter\Filters\Exceptions\FilterException;
4242
use CodeIgniter\HTTP\DownloadResponse;
4343
use CodeIgniter\HTTP\RedirectResponse;
4444
use CodeIgniter\HTTP\Request;
@@ -50,6 +50,7 @@
5050
use CodeIgniter\Events\Events;
5151
use CodeIgniter\HTTP\Response;
5252
use CodeIgniter\HTTP\CLIRequest;
53+
use CodeIgniter\Router\Exceptions\RedirectException;
5354
use CodeIgniter\Router\RouteCollectionInterface;
5455
use CodeIgniter\Exceptions\PageNotFoundException;
5556
use Exception;
@@ -65,7 +66,7 @@ class CodeIgniter
6566
/**
6667
* The current version of CodeIgniter Framework
6768
*/
68-
const CI_VERSION = '4.0.0-rc.2';
69+
const CI_VERSION = '4.0.0-rc.3';
6970

7071
/**
7172
* App startup time.
@@ -209,7 +210,7 @@ public function initialize()
209210
* @param boolean $returnResponse
210211
*
211212
* @return boolean|\CodeIgniter\HTTP\RequestInterface|\CodeIgniter\HTTP\Response|\CodeIgniter\HTTP\ResponseInterface|mixed
212-
* @throws \CodeIgniter\Filters\Exceptions\FilterException
213+
* @throws \CodeIgniter\Router\Exceptions\RedirectException
213214
* @throws \Exception
214215
*/
215216
public function run(RouteCollectionInterface $routes = null, bool $returnResponse = false)
@@ -244,14 +245,16 @@ public function run(RouteCollectionInterface $routes = null, bool $returnRespons
244245
{
245246
return $this->handleRequest($routes, $cacheConfig, $returnResponse);
246247
}
247-
catch (FilterException $e)
248+
catch (RedirectException $e)
248249
{
249250
$logger = Services::logger();
250251
$logger->info('REDIRECTED ROUTE at ' . $e->getMessage());
251252

252253
// If the route is a 'redirect' route, it throws
253254
// the exception with the $to as the message
254255
$this->response->redirect($e->getMessage(), 'auto', $e->getCode());
256+
$this->sendResponse();
257+
255258
$this->callExit(EXIT_SUCCESS);
256259
}
257260
catch (PageNotFoundException $e)

system/Commands/Database/CreateMigration.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* This content is released under the MIT License (MIT)
88
*
99
* Copyright (c) 2014-2019 British Columbia Institute of Technology
10+
* Copyright (c) 2019 CodeIgniter Foundation
1011
*
1112
* Permission is hereby granted, free of charge, to any person obtaining a copy
1213
* of this software and associated documentation files (the "Software"), to deal
@@ -28,7 +29,7 @@
2829
*
2930
* @package CodeIgniter
3031
* @author CodeIgniter Dev Team
31-
* @copyright 2014-2019 British Columbia Institute of Technology (https://bcit.ca/)
32+
* @copyright 2019 CodeIgniter Foundation
3233
* @license https://opensource.org/licenses/MIT MIT License
3334
* @link https://codeigniter.com
3435
* @since Version 4.0.0

system/Commands/Database/Migrate.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* This content is released under the MIT License (MIT)
99
*
1010
* Copyright (c) 2014-2019 British Columbia Institute of Technology
11+
* Copyright (c) 2019 CodeIgniter Foundation
1112
*
1213
* Permission is hereby granted, free of charge, to any person obtaining a copy
1314
* of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +30,7 @@
2930
*
3031
* @package CodeIgniter
3132
* @author CodeIgniter Dev Team
32-
* @copyright 2014-2019 British Columbia Institute of Technology (https://bcit.ca/)
33+
* @copyright 2019 CodeIgniter Foundation
3334
* @license https://opensource.org/licenses/MIT MIT License
3435
* @link https://codeigniter.com
3536
* @since Version 4.0.0

0 commit comments

Comments
 (0)