Skip to content

Commit b71cc8f

Browse files
committed
ADD StackTrace in log when model validation fails.
FIX CircleCI config.yml
1 parent a370226 commit b71cc8f

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

.circleci/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
# See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor
1111
docker:
1212
# Specify the version you desire here
13-
- image: circleci/php:7.4-node-browsers
13+
- image: cimg/php:8.1.4-node
1414

1515
# Specify service dependencies here if necessary
1616
# CircleCI maintains a library of pre-built images
@@ -26,8 +26,8 @@ jobs:
2626
steps:
2727
- checkout
2828

29-
- run: sudo apt update # PHP CircleCI 2.0 Configuration File# PHP CircleCI 2.0 Configuration File sudo apt install zlib1g-dev libsqlite3-dev
30-
- run: sudo docker-php-ext-install zip
29+
- run: sudo apt update -y && sudo apt-get install -y zip unzip # PHP CircleCI 2.0 Configuration File# PHP CircleCI 2.0 Configuration File sudo apt install zlib1g-dev libsqlite3-dev
30+
#- run: sudo docker-php-ext-install zip
3131

3232
# Download and cache dependencies
3333
- restore_cache:

.idea/misc.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Validable.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ public function validate()
7373
Log::debug(implode(PHP_EOL, $this->attributesToArray()));
7474
Log::debug('Errori di validazione:');
7575
Log::debug($this->getErrors());
76+
Log::debug('StackTrace:'.PHP_EOL);
77+
ob_start();
78+
debug_print_backtrace();
79+
$StackTrace = ob_get_contents();
80+
ob_end_clean();
81+
Log::debug($StackTrace);
7682
}
7783

7884
return false;

0 commit comments

Comments
 (0)