php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78353 php-yaml extension not compiled
Submitted: 2019-07-30 06:17 UTC Modified: 2020-04-22 20:57 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: a dot dankovtsev at mail dot ru Assigned: bd808 (profile)
Status: Closed Package: yaml (PECL)
PHP Version: master-Git-2019-07-30 (Git) OS: Mac OS
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: a dot dankovtsev at mail dot ru
New email:
PHP Version: OS:

 

 [2019-07-30 06:17 UTC] a dot dankovtsev at mail dot ru
Description:
------------
In php 8 breaking changes with removing TSRMLS_CC, TSRMLS_DC
I try fix it by removing this macros from this extension, but i don'k know true fix it.
Or being more right solve.


Patches

0001-remove-deleted-macros.patch (last revision 2019-08-05 05:35 UTC by a dot dankovtsev at mail dot ru)
0001-remove-deleted-macros (last revision 2019-07-30 06:18 UTC by a dot dankovtsev at mail dot ru)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-07-30 06:18 UTC] a dot dankovtsev at mail dot ru
The following patch has been added/updated:

Patch Name: 0001-remove-deleted-macros
Revision:   1564467488
URL:        https://bugs.php.net/patch-display.php?bug=78353&patch=0001-remove-deleted-macros&revision=1564467488
 [2019-07-30 06:55 UTC] cmb@php.net
-Package: *Extensibility Functions +Package: yaml
 [2019-07-31 14:27 UTC] a dot dankovtsev at mail dot ru
In additional previous patch, fix with segmentation fault on fresh master

patch:
```
From beea93b37f952da48e610984de71450666606ddc Mon Sep 17 00:00:00 2001
From: Aleksandr Dankovtsev <adankovtsev@avito.ru>
Date: Wed, 31 Jul 2019 17:24:08 +0300
Subject: [PATCH] convert to zend_object

---
 emit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/emit.c b/emit.c
index c931b8d..a6a7bbd 100644
--- a/emit.c
+++ b/emit.c
@@ -640,7 +640,7 @@ static int y_write_timestamp(
 	ZVAL_STRING(&dtfmt, "Y-m-d\\TH:i:s.uP");
 
 	/* format date as iso-8601 string */
-	zend_call_method_with_1_params(data, clazz, NULL, "format", &timestamp, &dtfmt);
+	zend_call_method_with_1_params(Z_OBJ_P(data), clazz, NULL, "format", &timestamp, &dtfmt);
 
 	/* emit formatted date */
 	status = yaml_scalar_event_initialize(&event, NULL, tag,
-- 
2.17.2 (Apple Git-113)

```
 [2019-08-05 05:35 UTC] a dot dankovtsev at mail dot ru
The following patch has been added/updated:

Patch Name: 0001-remove-deleted-macros.patch
Revision:   1564983307
URL:        https://bugs.php.net/patch-display.php?bug=78353&patch=0001-remove-deleted-macros.patch&revision=1564983307
 [2019-08-05 05:35 UTC] a dot dankovtsev at mail dot ru
Refresh patch with test fixes
 [2019-08-06 10:18 UTC] cmb@php.net
-Assigned To: +Assigned To: bd808
 [2019-08-06 10:18 UTC] cmb@php.net
While this doesn't look urgent, could you please have a look at the patch, Bryan?
 [2019-10-27 10:41 UTC] a dot dankovtsev at mail dot ru
Can you validate changes?
 [2020-04-22 20:17 UTC] bd808@php.net
All of these changes seem to have been proposed against a release tag rather than against the HEAD of the php7 branch. All of the issues this patch tries to address were fixed in the branch by 2019-04-16 (3 months before this bug report).

The extension's php_yaml_int.h header includes shim #defines for TSRMLS_DC and TSRMLS_CC (added in a8c349130865d3ec7562ed5adc4d9181ee7d3738), but it looks like they are unneeded in PHP7+ entirely, so I guess there is no harm in ripping the usage out.

The `end_call_method_with_1_params` fix supplied here was already patched in a8556e27112732a3f7797207ca7aa76019552b87.

The test fixes given were done a bit more compatibly with PHP 7.x in 79afc4b59fc064d84b26b9a10fd9fdc37e54b12b.
 [2020-04-22 20:57 UTC] bd808@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 13 10:01:27 2025 UTC