Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPhpObject serialization is not consistent. #23

Closed
StringEpsilon opened this issue Dec 17, 2021 · 0 comments
Closed

IPhpObject serialization is not consistent. #23

StringEpsilon opened this issue Dec 17, 2021 · 0 comments
Milestone

Comments

@StringEpsilon
Copy link
Owner

StringEpsilon commented Dec 17, 2021

Failing test:

public class MyPhpObject : IPhpObject {
	public string GetClassName() => "MyPhpObject";
	public void SetClassName(string className) {};
	public string Foo {get;set;}
}

[TestMethod]
public void SerializeIPhpObject() {
	Assert.AreEqual( // strings:
		"O:11:\"MyPhpObject\":{s:3:\"Foo\";s:0:\"\"}",
		PhpSerialization.Serialize( new MyPhpObject() {Foo =""})
	);
}

Noticed this while writing the documentation for the interface.

@StringEpsilon StringEpsilon added this to the 1.0 milestone Dec 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant