Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring Parable to 1.0.0 #27

Merged
merged 86 commits into from
Feb 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
a4d59d2
CHANGELOG will come later. Complete all doc blocks with explanations,…
devvoh Nov 22, 2017
86158dd
Add a space, or StyleCI will freak out.
devvoh Nov 22, 2017
048d00f
Add some spaces so the constants in App look nice.
devvoh Nov 22, 2017
a2d6e3a
Add more config values for Framework Mailer. Now has parable.mail.[se…
devvoh Nov 22, 2017
00e2ba8
Replace all 'Get x' doc comments with 'Return x' for consistency.
devvoh Nov 22, 2017
0bbc00e
Remove docs from .gitignore
devvoh Nov 22, 2017
5c9d4aa
Fix no routes found app test so that when it fails, it's not just 'di…
devvoh Nov 22, 2017
320b738
I almost don't want to mention it, but up the v to 1 and update the C…
devvoh Nov 23, 2017
f94f78d
Added some missing methods and fixed comments. See CHANGELOG.md
devvoh Nov 26, 2017
a48c702
Rework clearLine logic to use actual terminal width rather than buggy…
devvoh Nov 27, 2017
19966f4
Fix comments on Console Output methods that disable/enable line clear…
devvoh Nov 27, 2017
ef62e6e
Fix float detection in Route
devvoh Nov 27, 2017
cea9cb5
Add trick to float detection since is_float doesn't like strings
devvoh Nov 27, 2017
401ec69
Remove typed params from Route and guessing the value type from Model
devvoh Nov 27, 2017
b421904
Merge branch 'master' into develop
devvoh Nov 27, 2017
9b39b1f
Make Route object more robust, add some important tests, remove @var …
devvoh Nov 28, 2017
156e63e
StyleCI fix
devvoh Nov 28, 2017
6977aa4
Starting to regret this whole StyleCI thing.
devvoh Nov 28, 2017
f1c375f
Remove obsolete comment from CHANGELOG.md
devvoh Nov 28, 2017
d591bea
Add/rework some methods on Router
devvoh Nov 28, 2017
d16c614
Revert overwrite of dynamicReturnTypeMeta.json and fix the weird happ…
devvoh Nov 28, 2017
2749ab3
Fix obscure Path::getDir() bug, no longer need jury-rig in init-struc…
devvoh Nov 28, 2017
8cee277
Add Response::clearContent()
devvoh Nov 28, 2017
ad0c76f
Upgrade \Console\Input significantly with single key presses. Far too…
devvoh Nov 28, 2017
fc4cb70
Suck on a stick, StyleCI.
devvoh Nov 28, 2017
9ebbb7a
Add `$default` parameter to `\Parable\GetSet\Base::get()`
dmvdbrugge Nov 28, 2017
b634ec1
Merge pull request #30 from dmvdbrugge/default-for-getset-base-get
devvoh Nov 28, 2017
3a79130
Fix parameter parsing bug
dmvdbrugge Nov 29, 2017
bb2235a
Merge pull request #31 from dmvdbrugge/fix-argument-after-option
devvoh Nov 29, 2017
8eb5f5b
Rename some config values, add possibility to register classes with t…
devvoh Nov 29, 2017
ef4c6b0
Remove left-behind var_dump debug code
devvoh Nov 29, 2017
f28d547
Add getDispatchedRoute() to Dispatcher.
devvoh Nov 29, 2017
d127e6d
Add two dispatch events to hook into between controller/callable and …
devvoh Nov 29, 2017
054b310
Add setValue() on Route
devvoh Nov 29, 2017
44890bb
Remove ###VENDOR_PATH### rewriting in public/index.php and make it dy…
devvoh Nov 30, 2017
16d62d3
Add constants to Parameter to replace required/valueRequired booleans…
devvoh Nov 30, 2017
5c5af94
Rewrite parameters to use classes rather than arrays. Also rewrite pa…
devvoh Nov 30, 2017
9acfdcf
StyleCI again.
devvoh Nov 30, 2017
d84611d
Merge pull request #32 from devvoh/develop-parameter-rewrite
devvoh Nov 30, 2017
34b8982
Update CHANGELOG.md with the Parameter rewrite notables.
devvoh Nov 30, 2017
c01a65c
Options were set to be REQUIRED by default and should be OPTIONAL
devvoh Nov 30, 2017
a68d16d
Remove obsolete index setting from parseParameters()
devvoh Nov 30, 2017
c3026d2
Make the parable command executable by default
dmvdbrugge Nov 30, 2017
6554f0e
Merge pull request #33 from dmvdbrugge/plus-x-for-parable-executable
devvoh Nov 30, 2017
b86df14
Fix arguments
dmvdbrugge Nov 30, 2017
e9f8cfc
Merge pull request #34 from dmvdbrugge/fix-argument-indexing
devvoh Nov 30, 2017
2a807ff
Parameter::getArguments() no longer calls getArgument() since it does…
devvoh Dec 1, 2017
991ad9b
Many changes - WILL BREAK EVERY IMPLEMENTATION SO FAR. Check CHANGELOG.
devvoh Dec 6, 2017
a4e588f
There isn't a commit where StyleCI doesn't whine.
devvoh Dec 6, 2017
e644b84
Told ya.
devvoh Dec 6, 2017
0c62409
Add defines.php so DS and BASEDIR are back but without odd bootstrapp…
devvoh Dec 7, 2017
29f63b0
Now that BASEDIR is always defined, tests needed some attention.
devvoh Dec 7, 2017
91a3b92
Rename any() to multiple(), which accepts an array of methods, and ma…
devvoh Dec 7, 2017
6000a67
Okay StyleCI, I'll give you that one...
devvoh Dec 7, 2017
8b8d395
Some small fixes based on feedback from @dmvdbrugge
devvoh Dec 8, 2017
2246d4c
Update README.md summat.
devvoh Dec 8, 2017
5ebeba5
Make preformatted text prettier.
devvoh Dec 8, 2017
e9edfa9
Update README some mo and add CONTRIBUTING.md
devvoh Dec 8, 2017
e11664f
Update CONTRIBUTING.md with design goals.
devvoh Dec 10, 2017
155a32b
Console fixes for Windows
dmvdbrugge Dec 10, 2017
d676dcc
Ditch Windows `mode`, keep tput if shell.
dmvdbrugge Dec 11, 2017
d4731b8
Merge pull request #36 from dmvdbrugge/console-fixes-for-windows
devvoh Dec 11, 2017
8a1f296
Make @dmvdbrugge's fix for Console\Output more compact.
devvoh Dec 11, 2017
026d376
Prevent XSS through urls passed to the Router.
devvoh Dec 13, 2017
1667e78
Fix getOption() and getProvidedValue() for they break on falsy values.
dmvdbrugge Dec 16, 2017
b206198
Merge pull request #37 from dmvdbrugge/fix-option-value-zero
devvoh Dec 17, 2017
f72f37e
Add usage to Help, remove PARAMETER_x from Options, test fixes and im…
devvoh Dec 17, 2017
6b50d32
Small fixes.
devvoh Dec 17, 2017
a0c72f9
Small code & typo fixes
devvoh Dec 29, 2017
624a85c
Add tests for array-style controller+action callbacks and add a fix f…
devvoh Dec 29, 2017
67b5d34
Kill all the legacy! Routes now added using the method functions on A…
devvoh Dec 31, 2017
9440085
Add trailing newline
devvoh Dec 31, 2017
f9e38de
Re-introduce named routes, because that regression was unintended.
devvoh Jan 2, 2018
f06e4c9
PR fixes suggested by @dmvdbrugge
devvoh Jan 2, 2018
f41c589
More PR fixes
devvoh Jan 2, 2018
5372a5b
Merge pull request #38 from devvoh/break-the-routes
devvoh Jan 2, 2018
d873dd4
Move SessionMessage to Framework, clean up index.php/parable
devvoh Jan 7, 2018
d71d391
Remove test debug code
devvoh Jan 7, 2018
4991816
And some more. Great day.
devvoh Jan 7, 2018
ac8bb27
Refresh the default welcome page.
devvoh Jan 25, 2018
eadb701
Add parable.debug and parable.timezone to default Config\App file
devvoh Feb 1, 2018
cd4de1f
Add ::create() to Models for easy instantiating.
devvoh Feb 3, 2018
e1c1ca3
Fix style
devvoh Feb 3, 2018
d774fdc
Always uppercase the comparator & add like to ridiculous query test
devvoh Feb 3, 2018
942a2c2
Improvements to ORM and the default structure's config.
devvoh Feb 4, 2018
cbe53da
Update CHANGELOG and CHANGELOG-HISTORY.md
devvoh Feb 4, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
175 changes: 175 additions & 0 deletions CHANGELOG-HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,181 @@

This file contains the changelog history for Parable. Changelogs pertaining to versions two major versions before the current active version are moved here.

### 0.12.14

__Changes__
- `/bin/vendor/parable`, the command-line tool, now shows the Parable version.
- `\Parable\Rights\Rights` has an improved `combine()` method and gained `getRightsFromNames()` and `getNamesFromRights()` methods, so it's easier to work with.
- `\Parable\Framework\App` has lost its dependency on `\Parable\Filesystem\Path`, since it became obsolete after recent changes.
- `\Parable\ORM\Query` now has `addValues()`, so you can add an array of values instead of having to do them one-by-one.
- `\Parable\ORM\Repository` now has `createForModelName()`, which is now what `Toolkit::getRepository` calls as well. Toolkit's `getRepository` is sticking around, since it's more useful in views.
- Small fixes to increase code base quality.

__Bugfixes__
- The `parable init-structure` command used a hard-coded vendor path, which could eventually cause problems.
- Fixed tests up so that all components have 100% code coverage without `Framework` touching all the things. Also improved and simplified some tests.

### 0.12.13

__Changes__
- To ease development a little, try `make server` on a `make`-enabled OS (or run the php built-in webserver yourself with `php-server.php` passed as router script) and it will run (by default) on `http://localhost:5678`.
- `\Parable\Console\Parameter` and `Command` now understand that even arguments deserve default values. Third (optional) parameter added to `addArgument` that will allow for a default value.
- 5 whitespace issues fixed, based on feedback from StyleCI, using the PSR-2 preset. These were the only(!) style discrepancies found.

__Bugfixes__
- `Undefined offset` fixed in `\Parable\Console\Parameter::checkArguments()`. Requesting arguments that weren't provided no longer results in a notice.

### 0.12.12

__Bugfixes__
- Bug in `\Parable\\Routing\Route::isPartCountSame($url)`, where trailing slash vs no trailing slash would be considered not the same. Fixed in PR #25 by @jerry1970.

### 0.12.11

__Bugfixes__
- I can't believe nobody noticed this yet, but there was a bug in `\Parable\ORM\Query::buildOrderBy()`, where the key is actually escaped through `quote` rather than `quoteIdentifier`, leaving it as a quoted value rather than a key.
- Also `buildGroupBy()`, grmbl.

### 0.12.10

I'm cleaning up this file. All CHANGELOG entries older than the current 'major' pre-release version and the version before that have been moved to CHANGELOG-HISTORY.md.

__Changes__
- `\Parable\GetSet\Base` also got some love. Now, like in `\Parable\Framework\Config`, it's possible to get nested array values with the dot-notation. To get `$resource["one"]["two"]`, you can now use `$config->get("one.two");`. This of course works for all GetSet implementations, so also Post and Get. `$getSet->remove()` also supports this notation now.
- `\Parable\GetSet\Base` can do the same with set now. So to set (and create all currently non-existing) nested keys, you can do this `$config->set("one.two.three", "value");`.
- Since this copies the functionality already built into `\Parable\Framework\Config`, that class has now become an implementation of `\Parable\GetSet\Base`, making it all work exactly the same.

### 0.12.9

__Changes__
- `\Parable\GetSet\BaseInput` has been de-abstracted and renamed. It's now available as `\Parable\GetSet\InputStream`. This deprecates the `Put`, `Patch` and `Delete` GetSetters. This fixes #23.

### 0.12.8

__Bugfixes__
- `\Parable\Http\Url` now has separate base path and script name. So even if you place all but the public files outside of the server's document root, the index.php is still stripped to build the base url. This fixes #22.

### 0.12.7

__Changes__
- `\Parable\Http\Output\Json` has better error checking in `prepare()`, doing its best to make sure the content ends up as json. If it can't it'll throw an exception. This fixes issue #18.
- `\Parable\Http\Request` has received some love:
- `getHeader($key)` now also matches on different capitalisation, to make matching easier.
- `getCurrentUrl()` was added, which builds the current url from `$_SERVER` data.
- `getHttpHost()` was added, which does its best to return the most reliable value.
- `getRequestUrl()` was added.
- `getScriptName()` was added.
- `getBody()` was added, returning the value of `php://input` passed to the request.
- `ORM\Database` has gained `setCharset()` and `getCharset()`, so it's now possible to specifically set it. This will also be picked up from the config (key `database.charset`). This fixes issue #19. Fixed by @jerry1970.

__Bugfixes__
- `\Parable\GetSet\BaseInput` now auto-detects whether data is json or form-data and attempts to load it both ways. PHP doesn't care whether it's `x-www-form-urlencoded` or passed in the body, so it's all about what the data is.
- `\Parable\Model\ORM` was using the literal property `id` to check for a primary key. Now uses `$this->getTableKey()` instead.
- `\Parable\Routing\Route` didn't `rtrim` the / off of the urls. This made matching `url` with `url/` impossible.

### 0.12.6

__Changes__
- `\Parable\Framework\Toolkit::redirectToRoute()` now also accepts a `$parameters` array, to build route Urls with params like `\Parable\Routing\Router::getRouteUrlByName()` does.

__Bugfixes__
- `Init\Example` (structure file) did not yet use or explain the use of `HOOK_x` constants on `\Parable\Framework\App`.

### 0.12.5

__Changes__
- `\Parable\ORM\Model` now has the possibility of `toArrayWithoutEmptyValues` and `exportToArrayWithoutEmptyValues`, and the default `toArray` and `exportToArray` now return empty values.
- `\Parable\ORM\Repository` now offers `buildAndSet()` and `buildOrSet()`. This fixes issue #10.
- All hook `->trigger(...)` calls now make use of constants so that hooking into them is somewhat more comfortable as well. This fixes issue #11.
- It's now possible to add `errorMode` to the database config so you can set the error mode. Use the values defined on `PDO` for this: `ERRMODE_SILENT`, `ERRMODE_WARNING` or `ERRMODE_EXCEPTION`. `ERRMODE_SILENT` is the default, so it's no change for you. Setting more punishing error modes should be a conscious choice. This fixes issue #12.
- Typo in `Init\Example` fixed, was still referencing `initLocations`, whereas that's `inits` now. This fixes #14.
- `\Parable\Http\Request` now no longer sets Method in its `__construct` method, but checks the `$_SERVER` values every time `getMethod` is called.
- `\Parable\Http\Response::setHttpCode()` now throws an Exception when an invalid code is set.

__Bugfixes__
- You can now set a different `homeDir` than `public`, for those who need a different location due to their hosting setup. This makes it possible to keep all app-related code outside of the end-user-accessible dirs. This fixes #13.
- `\Parable\Console` now supports `--option=value` style options, as well as arguments. Simple `$command->addArgument("name", $required = bool)` and you can use them. Arguments are *in-order*, but can be either preceeded or succeeded by options. This fixes #15.
- `\Parable\Http\Response` now returns using the same HTTP protocol it was requested with, since it asks `\Parable\Http\Request` what it should be. This fixes issue #16.

### 0.12.4

__Bugfixes__
- `\Parable\Framework\Toolkit::redirectToRoute()` did not use `getUrl` to build the url on top of the baseUrl.

### 0.12.2 - 0.12.3

__Bugfixes__
- Left-over but un-DI-ed `$toolkit` property on `\Parable\Framework\View` was preventing use of toolkit in views.
- Removed `composer.lock` since it's useless to end users.

### 0.12.1

__Bugfixes__
- Hook related to dispatching was being triggered twice. Fixed now.

### 0.12.0

__Note: Breaks backwards compatibility. See list below for details how to upgrade from 0.11.x__

__Changes__
- New `Config` array layout. See the example `Config` for the changes!
- `Routing`, `Init` and additional `Config` files now load the same as `Commands` already did. Only `Config\App` is an expected part of Parable, and from there you can just pass in arrays with class names (see new example in structure) and Parable will get the values from them in the order you provide them in. This removes the need for `sortOrder` in Configs, makes `Routing` files easier to split up for readability, and for Inits it really doesn't change much. No more iterating over files! But it does mean you need to add your inits to your Config class and any child Config classes as well.
- `Config` files now need to implement `\Parable\Framework\Interfaces\Config`, no more extends.
- `Routing` files now need to implement `\Parable\Framework\Interfaces\Routing`, no more extends.
- Replaced `strpos` method of deciding whether a method was public or not with `Reflection` logic. Affects `\Parable\ORM\Model::toArray()` and `\Parable\ORM\Model::reset()`.
- No longer add structure folder to the autoload path in `tests/bootstrap.php`, since we no longer use the `_struct` files in testing.
- `\Parable\Framework\App\loadInits()` has been moved up in the run procedure, allowing more triggers: `parable_load_inits_after`, `parable_load_routes_before/after`, `parable_init_database_before/after`, `parable_dispatch_before/after`

### 0.11.5

__Changes__
- Rename all the files in `structure` to have a `_struct` suffix, so that IDEs don't pick up on then anymore.

### 0.11.4

__Bugfixes__
- `\Parable\DI\Container` had a bug where in some odd instances, while deciding the dependencies to DI for a class, the parameter's class would be `null` and attempting to get the `name` property from `null`, of course, failed.

### 0.11.3

__Changes__
- `\Parable\Http\Response` now only tries to prepend the output buffer if there's data in the buffer and `Response::$content` is already a string.
- `\Parable\GetSet` now has a new type of resource - those that require their data be parsed from `php://input`.
- Three `GetSet` types added due to the above: `\GetSet\Delete`, `\GetSet\Patch` and `\GetSet\Put`. This should make API builders really happy ;)
- `\Parable\ORM\Model` now returns only boolean values on success or fail, instead of a false on fail and a `PDOStatement` on success.
- Changed the command for `\Command\HelloWorld` to `hello-world` because _somebody_ cares too much about that stuff.

### 0.11.2

__Changes__
- Fixed up the README.md file, since it was a bit outdated. Also changed the 'feel' of the text to represent the maturing state of Parable.
- Renamed `init` command to `init-parable`, then immediately renamed it `init-structure` and added a check whether a structure was already initialized, adding a warning if it was.

### 0.11.1

Well, that was fast!

__Bugfixes__
- Fixed a bug in `\Parable\Http\Url`, where it was directly looking at `$_SERVER['REQUEST_SCHEME']`, which isn't always available. Added `\Parable\Http\Request::getScheme` to try out multiple options to figure it out instead.

### 0.11.0

Hey, look! Tests! With 100% code coverage, too! Run `make tests` to run them (which will attempt to `composer install` for needed libraries and then run the tests). Run `make coverage` to run the tests AND generate the HTML coverage report in `./coverage`.

With tests, every nook and cranny of the code was looked at, evaluated and where needed, checked, fixed, removed or added to.

This release also pulls out all interdependencies except for `Framework` still depending on other Components.

There's so many changes that it'll take a fly's lifetime to jot them all down, and it's just not worth it.

If you're upgrading from 0.10, I wish you all the luck, though in most cases the errors will show you the way.

__Changes__
- Many things.

__Bugfixes__
- Much more.

### 0.10.3

__Bugfixes__
Expand Down
Loading