mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-01-16 13:08:36 +01:00
Init RTD v2 config
This commit is contained in:
parent
d9439e3650
commit
b8aa050a73
13
.readthedocs.yaml
Normal file
13
.readthedocs.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
version: 2
|
||||
build:
|
||||
os: ubuntu-22.04
|
||||
tools:
|
||||
python: "3.11"
|
||||
|
||||
python:
|
||||
install:
|
||||
- requirements: requirements.txt
|
||||
|
||||
sphinx:
|
||||
configuration: conf.py
|
||||
fail_on_warning: false
|
@ -56,5 +56,5 @@ Tests/ChainTest.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/main/Behavioral/ChainOfResponsibilities
|
||||
.. _`GitHub`: https://github.com/DesignPatternsPHP/DesignPatternsPHP/tree/main/Behavioral/ChainOfResponsibilities
|
||||
.. __: http://en.wikipedia.org/wiki/Chain_of_responsibility_pattern
|
@ -89,5 +89,5 @@ Tests/UndoableCommandTest.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/main/Behavioral/Command
|
||||
.. _`GitHub`: https://github.com/DesignPatternsPHP/DesignPatternsPHP/tree/main/Behavioral/Command
|
||||
.. __: http://en.wikipedia.org/wiki/Command_pattern
|
||||
|
@ -67,5 +67,5 @@ Tests/InterpreterTest.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/main/Behavioral/Interpreter
|
||||
.. _`GitHub`: https://github.com/DesignPatternsPHP/DesignPatternsPHP/tree/main/Behavioral/Interpreter
|
||||
.. __: https://en.wikipedia.org/wiki/Interpreter_pattern
|
||||
|
@ -53,5 +53,5 @@ Tests/IteratorTest.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/main/Behavioral/Iterator
|
||||
.. _`GitHub`: https://github.com/DesignPatternsPHP/DesignPatternsPHP/tree/main/Behavioral/Iterator
|
||||
.. __: http://en.wikipedia.org/wiki/Iterator_pattern
|
||||
|
@ -63,5 +63,5 @@ Tests/MediatorTest.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/main/Behavioral/Mediator
|
||||
.. _`GitHub`: https://github.com/DesignPatternsPHP/DesignPatternsPHP/tree/main/Behavioral/Mediator
|
||||
.. __: http://en.wikipedia.org/wiki/Mediator_pattern
|
||||
|
@ -81,5 +81,5 @@ Tests/MementoTest.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/main/Behavioral/Memento
|
||||
.. _`GitHub`: https://github.com/DesignPatternsPHP/DesignPatternsPHP/tree/main/Behavioral/Memento
|
||||
.. __: http://en.wikipedia.org/wiki/Memento_pattern
|
||||
|
@ -70,5 +70,5 @@ Tests/LoggerTest.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/main/Behavioral/NullObject
|
||||
.. _`GitHub`: https://github.com/DesignPatternsPHP/DesignPatternsPHP/tree/main/Behavioral/NullObject
|
||||
.. __: http://en.wikipedia.org/wiki/Null_Object_pattern
|
||||
|
@ -54,5 +54,5 @@ Tests/ObserverTest.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/main/Behavioral/Observer
|
||||
.. _`GitHub`: https://github.com/DesignPatternsPHP/DesignPatternsPHP/tree/main/Behavioral/Observer
|
||||
.. __: http://en.wikipedia.org/wiki/Observer_pattern
|
||||
|
@ -71,5 +71,5 @@ Tests/SpecificationTest.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/main/Behavioral/Specification
|
||||
.. _`GitHub`: https://github.com/DesignPatternsPHP/DesignPatternsPHP/tree/main/Behavioral/Specification
|
||||
.. __: http://en.wikipedia.org/wiki/Specification_pattern
|
||||
|
@ -60,5 +60,5 @@ Tests/StateTest.php
|
||||
:linenos:
|
||||
|
||||
|
||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/main/Behavioral/State
|
||||
.. _`GitHub`: https://github.com/DesignPatternsPHP/DesignPatternsPHP/tree/main/Behavioral/State
|
||||
.. __: http://en.wikipedia.org/wiki/State_pattern
|
@ -67,5 +67,5 @@ Tests/StrategyTest.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/main/Behavioral/Strategy
|
||||
.. _`GitHub`: https://github.com/DesignPatternsPHP/DesignPatternsPHP/tree/main/Behavioral/Strategy
|
||||
.. __: http://en.wikipedia.org/wiki/Strategy_pattern
|
@ -60,5 +60,5 @@ Tests/JourneyTest.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/main/Behavioral/TemplateMethod
|
||||
.. _`GitHub`: https://github.com/DesignPatternsPHP/DesignPatternsPHP/tree/main/Behavioral/TemplateMethod
|
||||
.. __: http://en.wikipedia.org/wiki/Template_method_pattern
|
@ -64,5 +64,5 @@ Tests/VisitorTest.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/main/Behavioral/Visitor
|
||||
.. _`GitHub`: https://github.com/DesignPatternsPHP/DesignPatternsPHP/tree/main/Behavioral/Visitor
|
||||
.. __: http://en.wikipedia.org/wiki/Visitor_pattern
|
||||
|
@ -84,5 +84,5 @@ Tests/AbstractFactoryTest.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/main/Creational/AbstractFactory
|
||||
.. _`GitHub`: https://github.com/DesignPatternsPHP/DesignPatternsPHP/tree/main/Creational/AbstractFactory
|
||||
.. __: http://en.wikipedia.org/wiki/Abstract_factory_pattern
|
||||
|
@ -101,5 +101,5 @@ Tests/DirectorTest.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/main/Creational/Builder
|
||||
.. _`GitHub`: https://github.com/DesignPatternsPHP/DesignPatternsPHP/tree/main/Creational/Builder
|
||||
.. __: http://en.wikipedia.org/wiki/Builder_pattern
|
||||
|
@ -73,5 +73,5 @@ Tests/FactoryMethodTest.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/main/Creational/FactoryMethod
|
||||
.. _`GitHub`: https://github.com/DesignPatternsPHP/DesignPatternsPHP/tree/main/Creational/FactoryMethod
|
||||
.. __: http://en.wikipedia.org/wiki/Factory_method_pattern
|
||||
|
@ -57,5 +57,5 @@ Tests/PoolTest.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/main/Creational/Pool
|
||||
.. _`GitHub`: https://github.com/DesignPatternsPHP/DesignPatternsPHP/tree/main/Creational/Pool
|
||||
.. __: http://en.wikipedia.org/wiki/Object_pool_pattern
|
||||
|
@ -52,5 +52,5 @@ Tests/PrototypeTest.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/main/Creational/Prototype
|
||||
.. _`GitHub`: https://github.com/DesignPatternsPHP/DesignPatternsPHP/tree/main/Creational/Prototype
|
||||
.. __: http://en.wikipedia.org/wiki/Prototype_pattern
|
||||
|
@ -53,4 +53,4 @@ Tests/SimpleFactoryTest.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/main/Creational/SimpleFactory
|
||||
.. _`GitHub`: https://github.com/DesignPatternsPHP/DesignPatternsPHP/tree/main/Creational/SimpleFactory
|
||||
|
@ -47,5 +47,5 @@ Tests/SingletonTest.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/main/Creational/Singleton
|
||||
.. _`GitHub`: https://github.com/DesignPatternsPHP/DesignPatternsPHP/tree/main/Creational/Singleton
|
||||
.. __: http://en.wikipedia.org/wiki/Singleton_pattern
|
||||
|
@ -55,4 +55,4 @@ Tests/StaticFactoryTest.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/main/Creational/StaticFactory
|
||||
.. _`GitHub`: https://github.com/DesignPatternsPHP/DesignPatternsPHP/tree/main/Creational/StaticFactory
|
||||
|
@ -50,5 +50,5 @@ Tests/EAVTest.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/main/More/EAV
|
||||
.. _`GitHub`: https://github.com/DesignPatternsPHP/DesignPatternsPHP/tree/main/More/EAV
|
||||
.. __: https://en.wikipedia.org/wiki/Entity–attribute–value_model
|
||||
|
@ -76,4 +76,4 @@ Tests/PostRepositoryTest.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/main/More/Repository
|
||||
.. _`GitHub`: https://github.com/DesignPatternsPHP/DesignPatternsPHP/tree/main/More/Repository
|
||||
|
@ -60,5 +60,5 @@ Tests/ServiceLocatorTest.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/main/More/ServiceLocator
|
||||
.. _`GitHub`: https://github.com/DesignPatternsPHP/DesignPatternsPHP/tree/main/More/ServiceLocator
|
||||
.. __: http://en.wikipedia.org/wiki/Service_locator_pattern
|
||||
|
@ -1,6 +1,6 @@
|
||||
# DesignPatternsPHP
|
||||
|
||||
[![Build Status](https://github.com/domnikl/DesignPatternsPHP/workflows/CI/badge.svg)](https://github.com/domnikl/DesignPatternsPHP/actions)
|
||||
[![Build Status](https://github.com/DesignPatternsPHP/DesignPatternsPHP/workflows/CI/badge.svg)](https://github.com/DesignPatternsPHP/DesignPatternsPHP/actions)
|
||||
|
||||
Note from the maintainers:
|
||||
> The project's ReadTheDocs pages is currently down and are being reconfigured. We're sorry for any inconvenience please read through the repository directly on github.
|
||||
|
@ -67,5 +67,5 @@ Tests/AdapterTest.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/main/Structural/Adapter
|
||||
.. _`GitHub`: https://github.com/DesignPatternsPHP/DesignPatternsPHP/tree/main/Structural/Adapter
|
||||
.. __: http://en.wikipedia.org/wiki/Adapter_pattern
|
||||
|
@ -64,5 +64,5 @@ Tests/BridgeTest.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/main/Structural/Bridge
|
||||
.. _`GitHub`: https://github.com/DesignPatternsPHP/DesignPatternsPHP/tree/main/Structural/Bridge
|
||||
.. __: http://en.wikipedia.org/wiki/Bridge_pattern
|
||||
|
@ -59,5 +59,5 @@ Tests/CompositeTest.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/main/Structural/Composite
|
||||
.. _`GitHub`: https://github.com/DesignPatternsPHP/DesignPatternsPHP/tree/main/Structural/Composite
|
||||
.. __: http://en.wikipedia.org/wiki/Composite_pattern
|
||||
|
@ -62,5 +62,5 @@ Tests/DataMapperTest.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/main/Structural/DataMapper
|
||||
.. _`GitHub`: https://github.com/DesignPatternsPHP/DesignPatternsPHP/tree/main/Structural/DataMapper
|
||||
.. __: http://en.wikipedia.org/wiki/Data_mapper_pattern
|
||||
|
@ -14,7 +14,7 @@ class DataMapperTest extends TestCase
|
||||
{
|
||||
public function testCanMapUserFromStorage()
|
||||
{
|
||||
$storage = new StorageAdapter([1 => ['username' => 'domnikl', 'email' => 'liebler.dominik@gmail.com']]);
|
||||
$storage = new StorageAdapter([1 => ['username' => 'someone', 'email' => 'someone@example.com']]);
|
||||
$mapper = new UserMapper($storage);
|
||||
|
||||
$user = $mapper->findById(1);
|
||||
|
@ -63,5 +63,5 @@ Tests/DecoratorTest.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/main/Structural/Decorator
|
||||
.. _`GitHub`: https://github.com/DesignPatternsPHP/DesignPatternsPHP/tree/main/Structural/Decorator
|
||||
.. __: http://en.wikipedia.org/wiki/Decorator_pattern
|
||||
|
@ -59,5 +59,5 @@ Tests/DependencyInjectionTest.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/main/Structural/DependencyInjection
|
||||
.. _`GitHub`: https://github.com/DesignPatternsPHP/DesignPatternsPHP/tree/main/Structural/DependencyInjection
|
||||
.. __: http://en.wikipedia.org/wiki/Dependency_injection
|
||||
|
@ -12,9 +12,9 @@ class DependencyInjectionTest extends TestCase
|
||||
{
|
||||
public function testDependencyInjection()
|
||||
{
|
||||
$config = new DatabaseConfiguration('localhost', 3306, 'domnikl', '1234');
|
||||
$config = new DatabaseConfiguration('localhost', 3306, 'user', '1234');
|
||||
$connection = new DatabaseConnection($config);
|
||||
|
||||
$this->assertSame('domnikl:1234@localhost:3306', $connection->getDsn());
|
||||
$this->assertSame('user:1234@localhost:3306', $connection->getDsn());
|
||||
}
|
||||
}
|
||||
|
@ -62,5 +62,5 @@ Tests/FacadeTest.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/main/Structural/Facade
|
||||
.. _`GitHub`: https://github.com/DesignPatternsPHP/DesignPatternsPHP/tree/main/Structural/Facade
|
||||
.. __: http://en.wikipedia.org/wiki/Facade_pattern
|
||||
|
@ -41,5 +41,5 @@ Tests/FluentInterfaceTest.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/main/Structural/FluentInterface
|
||||
.. _`GitHub`: https://github.com/DesignPatternsPHP/DesignPatternsPHP/tree/main/Structural/FluentInterface
|
||||
.. __: http://en.wikipedia.org/wiki/Fluent_interface
|
@ -53,5 +53,5 @@ Tests/FlyweightTest.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/main/Structural/Flyweight
|
||||
.. _`GitHub`: https://github.com/DesignPatternsPHP/DesignPatternsPHP/tree/main/Structural/Flyweight
|
||||
.. __: https://en.wikipedia.org/wiki/Flyweight_pattern
|
||||
|
@ -52,5 +52,5 @@ ProxyTest.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/main/Structural/Proxy
|
||||
.. _`GitHub`: https://github.com/DesignPatternsPHP/DesignPatternsPHP/tree/main/Structural/Proxy
|
||||
.. __: http://en.wikipedia.org/wiki/Proxy_pattern
|
||||
|
@ -42,5 +42,5 @@ Tests/RegistryTest.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/main/Structural/Registry
|
||||
.. _`GitHub`: https://github.com/DesignPatternsPHP/DesignPatternsPHP/tree/main/Structural/Registry
|
||||
.. __: http://en.wikipedia.org/wiki/Service_locator_pattern
|
||||
|
@ -6,6 +6,10 @@
|
||||
{
|
||||
"name": "Dominik Liebler",
|
||||
"email": "liebler.dominik@googlemail.com"
|
||||
},
|
||||
{
|
||||
"name": "Borislav Sabev",
|
||||
"email": "39cn9aod@mailer.me"
|
||||
}
|
||||
],
|
||||
"minimum-stability": "stable",
|
||||
|
4
conf.py
4
conf.py
@ -43,7 +43,7 @@ source_suffix = '.rst'
|
||||
#source_encoding = 'utf-8-sig'
|
||||
|
||||
# The master toctree document.
|
||||
master_doc = 'README'
|
||||
master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = u'DesignPatternsPHP'
|
||||
@ -64,7 +64,7 @@ release = '1.0'
|
||||
#
|
||||
# This is also used if you do content translation via gettext catalogs.
|
||||
# Usually you set "language" from the command line for these cases.
|
||||
language = None
|
||||
language = 'en'
|
||||
|
||||
# There are two options for replacing |today|: either, you set today to some
|
||||
# non-false value, then it is used:
|
||||
|
@ -8,18 +8,14 @@
|
||||
DesignPatternsPHP
|
||||
=================
|
||||
|
||||
.. image:: https://github.com/domnikl/DesignPatternsPHP/workflows/CI/badge.svg
|
||||
:target: https://github.com/domnikl/DesignPatternsPHP/actions
|
||||
.. image:: https://github.com/DesignPatternsPHP/DesignPatternsPHP/workflows/CI/badge.svg
|
||||
:target: https://github.com/DesignPatternsPHP/DesignPatternsPHP/actions
|
||||
:alt: Build Status
|
||||
|
||||
.. image:: https://readthedocs.org/projects/designpatternsphp/badge/?version=latest
|
||||
:target: https://readthedocs.org/projects/designpatternsphp/?badge=latest
|
||||
:alt: Documentation Status
|
||||
|
||||
.. image:: https://img.shields.io/badge/donate-paypal-blue.svg?style=flat-square
|
||||
:target: https://paypal.me/DominikLiebler
|
||||
:alt: Donate
|
||||
|
||||
This is a collection of known design patterns and some sample code how
|
||||
to implement them in PHP. Every pattern has a small list of examples.
|
||||
|
3
requirements.txt
Normal file
3
requirements.txt
Normal file
@ -0,0 +1,3 @@
|
||||
sphinx
|
||||
sphinx_rtd_theme
|
||||
readthedocs-sphinx-search
|
Loading…
x
Reference in New Issue
Block a user