Commit Graph

45 Commits

Author SHA1 Message Date
Fabien Potencier a82782ac30 Report columns in syntax errors 2026-06-05 20:28:45 +02:00
Christophe Coevoet 62747cee27 Avoid errors when failing to guess the template info for an error 2025-09-02 14:21:58 +02:00
Nicolas Grekas 85a4817128 CS fixes 2025-07-29 10:07:07 +02:00
Fabien Potencier 719bba9d1e Simplify code 2025-02-28 08:54:29 +01:00
Christian Flothmann 53facb74c1 remove not needed code 2025-02-27 09:49:34 +01:00
Fabien Potencier 4e1fa3aa43 Remove obsolete comment 2025-02-26 22:19:38 +01:00
Fabien Potencier 7b43bd0fd7 Fix Error when the trace has Twig file/line information instead of the original PHP info 2025-02-26 21:02:58 +01:00
Fabien Potencier 4a121d90c6 Sync Error file and line 2025-02-26 13:26:24 +01:00
Fabien Potencier d5dc3eee99 Improve error reporting 2025-02-22 10:22:21 +01:00
Fabien Potencier d13d31bb68 minor #4594 Simplify Error (smnandre)
This PR was merged into the 3.x branch.

Discussion
----------

Simplify Error

Follows #4593

Commits
-------

6a651ccfdc Simplify Error
2025-02-22 10:02:33 +01:00
Simon André 6a651ccfdc Simplify Error 2025-02-22 04:07:17 +01:00
Fabien Potencier 68481a2a3a Simplify code 2025-02-22 00:03:13 +01:00
Fabien Potencier d10bcadd75 Simplify Error implementation 2025-02-21 11:34:30 +01:00
Fabien Potencier 11813da84d Use Stringable when possible 2024-08-26 17:41:21 +02:00
Fabien Potencier b63bde3063 Optimize sprintf() calls for PHP 8.4 2024-06-21 08:16:55 +02:00
Fabien Potencier f7f11ea410 Fix CS 2024-02-10 09:52:03 +01:00
Fabien Potencier b285fccd59 bug #3830 Catch errors thrown during template rendering (richards-square)
This PR was squashed before being merged into the 3.x branch.

Discussion
----------

Catch errors thrown during template rendering

Some errors, like not providing a function the proper number of arguments or division by zero, extend from `\Error` rather than `\Exception`. This PR catches these types of errors during template rendering and throws a `RuntimeError` in order to provide better debugging information.

Commits
-------

85bf01b4 Catch errors thrown during template rendering
2023-10-26 17:55:51 -07:00
Drew Richards 85bf01b4ab Catch errors thrown during template rendering 2023-10-26 17:55:48 -07:00
Jérôme Tamarelle 1d5c09285f Use PHP 8.0 functions with polyfill 2023-10-08 17:11:07 +02:00
Fabien Potencier fcbaa669ab Fix CS 2021-05-12 09:47:40 +02:00
Fabien Potencier 94b7c1c2f6 Merge branch '2.x' into 3.x
* 2.x:
  Fix CS
  added PHP 8.1 as experimental
2021-03-22 09:23:56 +01:00
Fabien Potencier 0b103dfeb0 Merge branch '1.x' into 2.x
* 1.x:
  added PHP 8.1 as experimental
2021-03-22 09:23:06 +01:00
Oleg Andreyev bef89dcc1e added PHP 8.1 as experimental 2021-03-22 09:19:53 +01:00
Brandon Kelly 67bff7b7c9 Fixed Twig\Template check 2020-08-13 06:50:55 -07:00
Fabien Potencier 7c16b12326 fixed CS 2019-05-14 09:17:34 +02:00
Fabien Potencier 54cec4e3b8 added type hints 2019-04-26 12:01:21 +02:00
Fabien Potencier 63cb4ebaf8 Merge branch '2.x' into 3.x
* 2.x:
  added missing items in the CHANGELOG
  removed obsolete comments
2019-04-25 11:48:46 +02:00
Fabien Potencier a729716375 Merge branch '1.x' into 2.x
* 1.x:
  removed obsolete comments
2019-04-25 11:42:18 +02:00
Fabien Potencier eed9c5fb87 removed obsolete comments 2019-04-25 07:57:20 +02:00
Fabien Potencier c4178fd235 removed obsolete Error features 2019-04-23 17:05:32 +02:00
Fabien Potencier 273b666a71 removed the obsolete lib/ directory, removed PSR-0 class aliases 2019-04-23 16:34:05 +02:00
Fabien Potencier 95b8ac3501 fixed bad merge 2019-04-12 12:16:31 +02:00
Fabien Potencier 1c80fa7205 Merge branch '1.x' into 2.x
* 1.x:
  added more tests
  added missing hints in some runtime exceptions
2019-04-12 12:08:49 +02:00
Fabien Potencier d4db91535d added missing hints in some runtime exceptions 2019-04-12 10:29:05 +02:00
Fabien Potencier 1dead73882 added some type hints on constructors 2019-03-16 15:26:39 +01:00
Fabien Potencier 2861b40965 Merge branch '1.x' into 2.x
* 1.x:
  removed -2 magic number
  tried to avoid guessing template info on errors
2019-03-11 16:18:55 +01:00
Fabien Potencier 69c0539cc6 removed -2 magic number 2019-03-11 16:11:54 +01:00
Fabien Potencier 2389faeae3 tried to avoid guessing template info on errors 2019-03-11 16:04:11 +01:00
Fabien Potencier 29a2e18e14 Merge branch '1.x' into 2.x
* 1.x:
  fixed some issues
2019-03-06 22:09:35 +01:00
Fabien Potencier c58fa84054 fixed some issues 2019-03-06 22:08:00 +01:00
Fabien Potencier 037ee67224 switched to namespace first, PSR-0 as a fallback 2019-03-05 08:14:45 +01:00
Fabien Potencier baa70287f5 switched to namespace first, PSR-0 as a fallback 2019-03-04 21:33:40 +01:00
Maxime Steinhausser 2c174e4015 Use class_exists instead of require 2017-06-05 23:42:50 +02:00
Nicolas Grekas 5420a5e3f8 Add the aliases 2017-05-25 08:32:07 +02:00
Nicolas Grekas 71af32b306 Add namespaced aliases 2017-05-24 10:12:32 +02:00