Skip to content

Commit

Permalink
Merge branch 'master' into NO-ISSUE_improve_actions
Browse files Browse the repository at this point in the history
  • Loading branch information
DEVizzent authored Jan 10, 2024
2 parents a1b3521 + 9821397 commit 07ae1ae
Show file tree
Hide file tree
Showing 39 changed files with 17,816 additions and 39 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
yarn.lock export-ignore
docker-compose.yml export-ignore
Makefile export-ignore
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@

/.php_cs.cache
/.phpunit.result.cache

/.idea
xdebug_remote.log
php-cs-fixer.phar
15 changes: 1 addition & 14 deletions composer.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"require": {
"php": ">=7.1.0",
"ext-json": "*",
"symfony/yaml": "^3.4 || ^4 || ^5 || ^6",
"symfony/yaml": "^3.4 || ^4 || ^5 || ^6 || ^7",
"justinrainbow/json-schema": "^5.2"
},
"require-dev": {
Expand All @@ -36,7 +36,6 @@

"mermade/openapi3-examples": "1.0.0",
"apis-guru/openapi-directory": "1.0.0",
"nexmo/api-specification": "1.0.0",
"phpstan/phpstan": "^0.12.0"
},
"conflict": {
Expand Down Expand Up @@ -103,18 +102,6 @@
"reference": "openapi3.0.0"
}
}
},
{
"type": "package",
"package": {
"name": "nexmo/api-specification",
"version": "1.0.0",
"source": {
"url": "https://github.com/Nexmo/api-specification",
"type": "git",
"reference": "voice-2.0.0"
}
}
}
]
}
4 changes: 4 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@ services:
- ./tests/tmp/.composer:/root/.composer:rw
- .:/app
environment:
- PHP_IDE_CONFIG='serverName=host.docker.internal'
- XDEBUG_TRIGGER=1
- TZ=UTC
- TIMEZONE=UTC
- IN_DOCKER=docker
- PHP_XDEBUG_ENABLED=1
- XDEBUG_CONFIG="remote_host=host.docker.internal"
- PHP_IDE_CONFIG="serverName=Docker"
extra_hosts:
- "host.docker.internal:host-gateway"
tty: true
node:
image: node:12
Expand Down
3 changes: 1 addition & 2 deletions schemas/openapi-v3.1.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,7 @@
"type": "object",
"properties": {
"url": {
"type": "string",
"format": "uri-reference"
"type": "string"
},
"description": {
"type": "string"
Expand Down
1 change: 0 additions & 1 deletion schemas/openapi-v3.1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ $defs:
properties:
url:
type: string
format: uri-reference
description:
type: string
variables:
Expand Down
3 changes: 3 additions & 0 deletions src/spec/OpenApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ public function performValidation()
*/
public function getMajorVersion()
{
if (empty($this->openapi)) {
return self::VERSION_UNSUPPORTED;
}
if (preg_match(static::PATTERN_VERSION, $this->openapi, $matches)) {
switch ($matches[1]) {
case '3.0':
Expand Down
13 changes: 2 additions & 11 deletions tests/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RUN apt-get update && \
--no-install-recommends && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& pecl install xdebug-2.9.6 \
&& pecl install xdebug-3.1.5 \
&& docker-php-ext-enable xdebug \
&& docker-php-ext-install \
zip \
Expand All @@ -43,15 +43,6 @@ RUN curl -o /tmp/composer-setup.php https://getcomposer.org/installer \
&& php /tmp/composer-setup.php --no-ansi --install-dir=/usr/local/bin --filename=composer \
&& rm -f /tmp/composer-setup.*

# Enable Xdebug
ENV XDEBUGINI_PATH=/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini

RUN echo "xdebug.idekey=PHP_STORM" >> $XDEBUGINI_PATH && \
echo "xdebug.default_enable=1" >> $XDEBUGINI_PATH && \
echo "xdebug.remote_enable=1" >> $XDEBUGINI_PATH && \
echo "xdebug.remote_connect_back=1" >> $XDEBUGINI_PATH && \
echo "xdebug.remote_log=xdebug_remote.log" >> $XDEBUGINI_PATH && \
echo "xdebug.remote_port=9000" >> $XDEBUGINI_PATH && \
echo "xdebug.remote_autostart=1" >> $XDEBUGINI_PATH
COPY ./tests/docker/rootfs /

WORKDIR /app
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ xdebug.mode=debug
xdebug.start_with_request=yes
xdebug.discover_client_host=false
## You need this for configure it in your IDE
xdebug.idekey="PROJECT_NAME"
xdebug.idekey="OPENAPI"
## This is for xdebug php cli
xdebug.trigger_value="PROJECT_NAME"
xdebug.trigger_value="OPENAPI"
xdebug.client_port=9003
xdebug.log_level=0
xdebug.log_level=7
## And here we set that we do it through docker
xdebug.client_host=host.docker.internal
Loading

0 comments on commit 07ae1ae

Please sign in to comment.