Skip to content

Commit

Permalink
update todo and add upgrade doc
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskapp committed Apr 26, 2016
1 parent 9918ed3 commit c75c2ba
Show file tree
Hide file tree
Showing 2 changed files with 141 additions and 31 deletions.
74 changes: 43 additions & 31 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,42 @@
_Ever growing list of ideas and thoughts howto improve and extend PSX. Topics_
_which are likely to be implemented are moved to a seperate github issue_

### 1.x
### 2.x

- [ ] We need a command which reads a RAML/Swagger file and generates a
- [ ] Handle JSONRpc calls
- [x] SchemaApiAbstract for outgoing schemas we need an option to set an
passthru schema which simply outputs all provided data
- [x] Use https://github.com/nikic/PHP-Parser/blob/master/doc/4_Code_generation.markdown
to generate code
- [x] Remove set/getRestrictedFields in TableAbstract
- [x] Redesign framework generations commands
- [x] Fix problem with annotation collision @Title in api and schema
- [x] Schema manager erturns same instance probably a problem when a schema gets
modified
- [x] Add annotation to define the class of the request body, thus we must
remove the RecordInterface type hint of the doPost etc methods
- [x] Create schema generator which dumps a schema as PHP code
- [x] Remove doCreate and doUpdate call in SchemaApiAbstract
- [x] Think about moving from a monolith repo into multiple packages. There are
some components which might be useful withput psx i.e. data, schema
- [x] We need a command which reads a RAML/Swagger file and generates a
controller with annotations based on the definition

### 1.x

- [ ] Add GraphQL parser to generate a schema based on a GraphQL string #12
- [ ] Add Swagger2 support #11
- [ ] Improve OAuth2 support #7
- [ ] Add host-meta controller to expose specific API services #5
- [ ] Create controller which generates a text/uri-list #4
- [ ] Add WADL generator #2
- [ ] Probably adapt a common API error format:
https://github.com/blongden/vnd.error
https://tools.ietf.org/html/draft-nottingham-http-problem-07
- [ ] Add controller to server static content
- [ ] Better support for conditional requests E-Tag, If-Match etc.
- [ ] Think about support for OData
- [ ] Think about support for JSON-RPC
- [ ] Add Swagger2 support #11
- [ ] Add GraphQL parser to generate a schema based on a GraphQL string #12
- [ ] Add http interceptor handler and method to add global default headers i.e.
a user agent header (these can be overriden by a specific set header)
- [ ] Use DateTimeImmutable if we are dropping support for 5.4 and require at
Expand All @@ -22,10 +45,6 @@ _which are likely to be implemented are moved to a seperate github issue_
of the prototype element
- [ ] Evaluate again whether to use psr7. Probably wait to see adoption,
immutability is still a problem
- [ ] Improve OAuth2 support #7
- [ ] Add host-meta controller to expose specific API services #5
- [ ] Create controller which generates a text/uri-list #4
- [ ] Add WADL generator #2
- [ ] Extend schema representation
- [ ] Add schema property default value option
- [ ] Possibility to describe in an API that authentication is required.
Expand All @@ -36,24 +55,8 @@ _which are likely to be implemented are moved to a seperate github issue_
- [x] Add possibility to add a wildcard type in a schema which allows
arbitrary subtypes where we dont know the structure i.e. config (Is this
a good idea?)
- [ ] Add commands which generate php code
- [ ] Add command to generate an API endpoint based on a RAML file
- [ ] Add command to generate a PHP schema based on a json schema
- [ ] Add command to generate a json schema from a PHP schema
- [ ] Add command to generate client code based on the API definition. Probably
this should be done in another project and based on a RAML/jsonschema spec
- [ ] Add event listener to table manager so that we can fire an event everytime
a record gets created, updated or deleted
- [ ] Schema generation
- [ ] Probably add json schema importer command to create a PHP schema based
on the given json schema
- [ ] Add generator to generate a php schema class from a xsd or json schema
definition
- [ ] Create tool controller to create and export a schema. Should produce
a json schema which can be imported by a command
- [ ] Create command to create PHP source code based on a RAML spec. This
could probably use the json schema generator to generate the schema
class. So we could create a complete schema endpoint from the RAML spec
- [ ] Consider use Stash as caching library if PSR is ready
- [ ] Evaluate whether we could build a RDF writer
- [ ] Add verify method to psx sql condition to verify conditions against an
Expand All @@ -74,13 +77,6 @@ _which are likely to be implemented are moved to a seperate github issue_
we should add support for it
- [ ] Test and handle file uploads

### 2.x

- [ ] Remove doCreate and doUpdate call in SchemaApiAbstract
- [ ] Remove set/getRestrictedFields in TableAbstract
- [ ] Think about moving from a monolith repo into multiple packages. There are
some components which might be useful withput psx i.e. data, schema

### Meta

- [ ] Update github readme, more getting started instructions etc.
Expand All @@ -93,6 +89,22 @@ _which are likely to be implemented are moved to a seperate github issue_

### Archive

- [x] Add commands which generate php code
- [x] Add command to generate an API endpoint based on a RAML file
- [x] Add command to generate a PHP schema based on a json schema
- [x] Add command to generate a json schema from a PHP schema
- [x] Add command to generate client code based on the API definition. Probably
this should be done in another project and based on a RAML/jsonschema spec
- [x] Schema generation
- [x] Probably add json schema importer command to create a PHP schema based
on the given json schema
- [x] Add generator to generate a php schema class from a xsd or json schema
definition
- [/] Create tool controller to create and export a schema. Should produce
a json schema which can be imported by a command
- [x] Create command to create PHP source code based on a RAML spec. This
could probably use the json schema generator to generate the schema
class. So we could create a complete schema endpoint from the RAML spec
- [x] Consider use of JAX-RS annotations to provide meta informations for a
controller #3
- [x] Add ANY request method in router
Expand Down
98 changes: 98 additions & 0 deletions UPGRADE-2.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@

# Upgrade from 1.x to 2.0

With the 2.x release we moved from a monolithic library to a component based.
That means we have split up the framework into components which can also be used
independent of the framework.

* The `RecordInterface` type hint and `Version` parameter from the
`SchemaApiAbstract::do*` methods was removed i.e.:
__Before:__
`protected function doPost(RecordInterface $record, Version $version)`
__After:__
`protected function doPost($record)`

* The following controller classes have changed:
* `PSX\Controller\ApiAbstract` => `PSX\Framework\Controller\ApiAbstract`
* `PSX\Controller\SchemaApiAbstract` => `PSX\Framework\Controller\SchemaApiAbstract`
* `PSX\Controller\TableApiAbstract` => (removed)
* `PSX\Controller\ViewAbstract` => `PSX\Framework\Controller\ViewAbstract`
* `PSX\ControllerAbstract` => `PSX\Framework\Controller\ControllerAbstract`
* `PSX\Controller\Tool\CommandController` => (removed)
* `PSX\Controller\Tool\DefaultController` => `PSX\Framework\Controller\Tool\DefaultController`
* `PSX\Controller\Tool\DiscoveryController` => `PSX\Framework\Controller\Tool\DiscoveryController`
* `PSX\Controller\Tool\DocumentationController` => `PSX\Framework\Controller\Tool\DocumentationController`
* `PSX\Controller\Tool\RoutingController` => `PSX\Framework\Controller\Tool\RoutingController`
* `PSX\Controller\Tool\RamlGeneratorController` => `PSX\Framework\Controller\Generator\RamlController`
* `PSX\Controller\Tool\SwaggerGeneratorController` => `PSX\Framework\Controller\Generator\SwaggerController`
* `PSX\Controller\Tool\WsdlGeneratorController` => `PSX\Framework\Controller\Generator\WsdlController`
* `PSX\Controller\Tool\SoapProxyController` => `PSX\Framework\Controller\Proxy\SoapController`

* Change all controller extends from `AnnotationApiAbstract` to `SchemaApiAbstract`
The `SchemaApiAbstract` controller contains now by default the annotation
parser. The class `AnnotationApiAbstract` still exists but is deprecated.

* The signature of the `getDocumentation` method has changed:
__Before:__
`public function getDocumentation()`
__After:__
`public function getDocumentation($version = null)`

* DI container service changes:
* `http` => `http_client`
* `io` => (added)
* `api_parser` => (added)
* `annotation_reader_controller` => (added)
* `command_factory` => (removed)
* `command_output` => (removed)
* `executor` => (removed)
* `reader_factory` => (removed)
* `writer_factory` => (removed)
* `transformer_manager` => (removed)
* `importer_manager` => (removed)
* `schema_validator` => (removed)
* `schema_assimilator` => (removed)
* `record_factory_factory` => (removed)
* `importer` => (removed)
* `extractor` => (removed)
* `serializer` => (removed)

* The following list contains common classes:
* `PSX\Base` => `PSX\Framework\Base`
* `PSX\Cache` => `PSX\Cache\Pool`
* `PSX\Config` => `PSX\Framework\Config\Config`
* `PSX\DateTime` => `PSX\DateTime\DateTime`
* `PSX\Event` => `PSX\Framework\Event\Event`
* `PSX\FilterAbstract` => `PSX\Validate\FilterAbstract`
* `PSX\Http` => `PSX\Http\Client`
* `PSX\Json` => `PSX\Json\Parser`
* `PSX\Uri` => `PSX\Uri\Uri`
* `PSX\Url` => `PSX\Uri\Url`
* `PSX\Urn` => `PSX\Uri\Urn`
* `PSX\Sql` => `PSX\Sql\Sql`

* Most applications should work after these changes. The following list contains
all namespace changes:
* `PSX\ActivityStream\*` -> `PSX\Model\ActivityStream\*`
* `PSX\Annotation\*` -> `PSX\Framework\Annotation\*`, `PSX\Api\Annotation\*`
* `PSX\Atom\*` -> `PSX\Model\Atom\*`
* `PSX\Command` => (Removed)
* `PSX\Config` -> `PSX\Framework\Config`
* `PSX\Console` -> `PSX\Framework\Console`
* `PSX\Controller` -> `PSX\Framework\Controller`
* `PSX\Dependency` -> `PSX\Framework\Dependency`
* `PSX\Dispatch` -> `PSX\Framework\Dispatch`
* `PSX\Event` -> `PSX\Framework\Event`
* `PSX\Exception` -> `PSX\Framework\Exception`
* `PSX\File` -> (Removed)
* `PSX\Filter` -> `PSX\Validate\Filter`
* `PSX\Loader` -> `PSX\Framework\Loader`
* `PSX\Log` -> `PSX\Framework\Log`
* `PSX\Rss` -> `PSX\Model\Rss`
* `PSX\Session` -> `PSX\Framework\Session`
* `PSX\Swagger` -> `PSX\Model\Swagger`
* `PSX\Template` -> `PSX\Framework\Template`
* `PSX\Test` -> `PSX\Framework\Test`
* `PSX\Upload` -> `PSX\Framework\Upload`
* `PSX\Util` -> `PSX\Framework\Util`

0 comments on commit c75c2ba

Please sign in to comment.